Practical case / Vehicle dealership

03 · Dealership: manage vehicles, customers and visits

Build a sales application with available vehicles, customer records and related test-drive appointments. Add views and a visit-closing rule.

·

90–120 minutesIntermediate level
What you will build
Model-driven application to track vehicles and sales visits.
Tools
Dataverse · Power Apps · Model-driven application
On this page · 8 sections

The dealership's problem

Motor Demo organizes test drives through messages. One salesperson confirms an appointment without knowing the vehicle is reserved; another ends a visit without recording the customer's interests.

You will bring together three related records. Brands, customers, and transactions are fictitious. File email addresses use example.com and must not be used as automation recipients.

1. Create the sales model

In a solution named Motor Demo Ventas, create these tables. Make each primary column business-required:

Table Primary column Other columns
Motor Vehiculos Referencia, text Marca and Modelo, text; Anio, whole number; Precio, two-decimal number; Disponibilidad, choice
Motor Clientes Codigo, text Cliente, text; Correo, email
Motor Visitas Visita, text FechaHora, date/time; EstadoVisita, choice; Resultado, multiple lines

Disponibilidad choices: Disponible, Reservado, Vendido. EstadoVisita choices: Pendiente, Confirmada, Realizada, Cancelada.

In Motor Visitas create two many-to-one relationships: Cliente → Motor Clientes and Vehiculo → Motor Vehiculos. One person and one vehicle can appear in several visits.

For FechaHora use behavior User Local and check that the user's time zone is Madrid. CSV times are expressed in Madrid time.

2. Load operational data

Create the three vehicles and three customers from the CSVs. Import simple fields or enter rows manually. Check that imported choices match the choices you created.

Then create the three visits and select customers and vehicles through lookups. C001 and VH-101 are business references: do not paste them as Dataverse GUIDs.

Review PR-003: it is canceled because VH-103 is reserved. This consistency is prepared in the sample data; you have not yet built a rule automatically preventing appointments on reserved vehicles.

3. Prepare useful forms

In the Vehiculos main form, group reference, make, model, price, and availability. In Visitas include all columns, both lookups, and Resultado.

Add a business rule in Motor Visitas:

  1. Condition: EstadoVisita is Realizada.
  2. True branch: Resultado is required.
  3. False branch: Resultado is not required.
  4. Set scope to the main form being used, validate, save, and activate.

Resultado and EstadoVisita must be present on that form. The rule controls this form experience; enforcing the requirement across all integrations needs appropriate server-side validation.

4. Create working views

From the solution, open each table and go to Views. Create a view, add the listed columns, and use Edit filters in the properties pane to define the condition.

Table and view Filter Visible columns
Vehiculos · Disponibles para visitar Disponibilidad = Disponible Referencia, Marca, Modelo, Anio, Precio
Visitas · Pendientes de confirmar EstadoVisita = Pendiente Visita, Cliente, Vehiculo, FechaHora
Visitas · Seguimiento comercial EstadoVisita is not Cancelada Visita, Cliente, EstadoVisita, Resultado

Save and publish the views and forms.

5. Assemble the app

In the solution, select New → App → Model-driven app. Name it Motor Demo Comercial. In the designer, add Dataverse table pages for Vehiculos, Clientes, and Visitas.

Include the prepared forms and views, save, and publish the app. Open Play to work through the salesperson's experience.

6. Check the process

Action Expected result
Open Disponibles para visitar VH-101 and VH-102
Open Pendientes de confirmar PR-001
Open PR-001 Customer C001 and vehicle VH-101
Change PR-001 to Realizada without Resultado The form requires Resultado to be completed
Enter Interested; send proposal and save The visit remains marked as completed
Return to Pendientes de confirmar PR-001 no longer appears

Submit the app and evidence for these six checks. A real scheduling system would also need overlap handling, transactional availability, and sales-team permissions; do not attribute those capabilities to views.

Official documentation

Documentation checked on October 18, 2026. Execution in a Microsoft environment: pending verification.

The conversation continues here

Questions and experiences

Stuck on a step or found another way? Share what you have tried and help those who come after you.

Read comments or sign in to participate.

Loading comments…