PL 400 Model-Driven Apps 3 — Questions and Answers
Question 1: A developer needs to add a custom button to the command bar of a model-driven app entity view. Which tool is recommended for this in the modern approach?
- Ribbon Workbench
- Power Apps command designer (Correct answer)
- AppModule designer
- Sitemap editor
Correct answer: Power Apps command designer
The Power Apps command designer (Command Bar) is the modern, recommended tool for adding and configuring command bar buttons without XML editing.
Question 2: In a model-driven app, which event fires after a form successfully saves a record to Dataverse?
- OnLoad
- OnChange
- OnSave
- PostSave (Correct answer)
Correct answer: PostSave
The PostSave event fires after the record has been successfully saved, making it ideal for actions that depend on the save having completed.
Question 3: What does the formContext.ui.setFormNotification method do in a model-driven app?
- Sends an email notification to the record owner
- Displays an inline notification message on the form (Correct answer)
- Triggers a Power Automate flow
- Sets a field value and marks it as required
Correct answer: Displays an inline notification message on the form
setFormNotification displays an informational, warning, or error message banner directly on the model-driven app form.
Question 4: Which Dataverse feature allows a developer to define that a particular table column must be unique across all records?
- Business rule with condition
- Alternate key (Correct answer)
- Primary key constraint
- Column-level security profile
Correct answer: Alternate key
Alternate keys enforce uniqueness on one or more columns and can also be used as upsert keys in API operations.
Question 5: A model-driven app has a lookup field pointing to Accounts. The developer wants to restrict the lookup to only show accounts in a specific city. Which approach should they use?
- Business rule on the parent form
- View used by the lookup (lookup view filter) (Correct answer)
- Security role restriction
- Column-level security on City field
Correct answer: View used by the lookup (lookup view filter)
Configuring the lookup view or adding a filter view to the lookup control restricts which records appear when users search in that lookup field.
Question 6: Which JavaScript object represents the current form context and is typically passed as a parameter in form event handlers?
- Xrm.Page (deprecated)
- executionContext.getFormContext() (Correct answer)
- Xrm.Navigation
- formContext.data.entity
Correct answer: executionContext.getFormContext()
executionContext.getFormContext() is the supported way to obtain the formContext object in modern model-driven app event handlers.
Question 7: In a model-driven app solution, what does enabling 'Managed properties' on a component control?
- Whether the component can be used in canvas apps
- Whether the component can be customized after importing in a managed solution (Correct answer)
- Whether the component is visible to all users
- Whether the component is included in solution exports
Correct answer: Whether the component can be customized after importing in a managed solution
Managed properties define whether a solution component can be modified by the customer after the managed solution is installed.
A developer needs to add a custom button to the command bar of a model-driven app entity view.
Which tool is recommended for this in the modern approach?