Build a customer management app
Model customers, give them a list and detail screen, decide who can see which customers, and add a status lifecycle.
- Level
- Beginner
- Estimated time
- About 45 minutes
- Uses
- Metadata, Screens, Access, Lifecycles
What you will build
A Customer entity with a list screen, a detail screen, role-based access and a Prospect → Active → Churned lifecycle.
Architecture
- Entity
- Screen
- Permissions
- Lifecycle
Steps
1Create the Customer entity
In TAF Studio open the object designer and add a table named
Customerwith fields such as Name (text, required), Industry (pick list), Email and Owner. Use Preview SQL to see the table the platform will create, then publish. Registering the table gives you the entity, its fields, three saved queries (Default, List and Detail) and default access rows for every role.2Design the list and detail screens
Open the screen designer, create a List screen bound to the
List_Customerquery and a Detail screen bound to the Detail query. Drag in the grid, text fields and a lookup for Owner. Preview the screen, then publish it and add it to a menu item.3Decide who sees which customers
In object permissions give the Sales role Read and Update scope Own on Customer, and the Sales manager role scope Team. Own means records the user created or owns; Team follows the reporting hierarchy. The data engine applies these to every query, including the grid you just built.
4Add a lifecycle
Create a lifecycle for Customer with the statuses Prospect, Active and Churned and the transitions between them, and turn on lifecycle support for the entity. New customers now start as Prospect, and the stage component on the detail screen offers only the allowed next statuses.
Result
Users sign in and see only the customers their role allows, create and edit them from the screens, and move them through the lifecycle with history kept for every transition.
Step-by-step screenshots for this tutorial are coming soon.