PL 400 Model-Driven Apps 5 — Questions and Answers
Question 1: When customizing a model-driven app command bar using modern commanding, which language is used to write the action logic for a button?
- JavaScript only
- Power Fx or JavaScript (Correct answer)
- C# plug-in
- TypeScript compiled to WASM
Correct answer: Power Fx or JavaScript
Modern commanding in model-driven apps supports both Power Fx expressions and JavaScript functions as the action for command bar buttons.
Question 2: A model-driven app form has an OnSave event handler that calls event.preventDefault(). What is the effect?
- The form closes without saving
- The save operation is cancelled and the record is not saved (Correct answer)
- The form reloads from the server
- An error notification is shown to the user automatically
Correct answer: The save operation is cancelled and the record is not saved
Calling preventDefault() on the save event object cancels the save operation, preventing the record from being written to Dataverse.
Question 3: Which Dataverse concept allows developers to define reusable sets of security privileges that can be applied to multiple security roles?
- Field security profiles
- Security role templates
- Miscellaneous privileges set
- There is no such concept; privileges are defined per role (Correct answer)
Correct answer: There is no such concept; privileges are defined per role
In Dataverse, privileges are configured directly on each security role; there is no reusable privilege set or template that can be shared across roles.
Question 4: A developer wants a model-driven app to show a filtered list of contacts when a user opens the app. Which feature should they configure?
- A personal view saved by the developer
- A system view filtered using Advanced Find criteria as the default view (Correct answer)
- A business rule that hides records
- A plug-in that modifies the RetrieveMultiple response
Correct answer: A system view filtered using Advanced Find criteria as the default view
Setting a filtered system view as the default view for a table in a model-driven app controls what records users see when they first open the grid.
Question 5: In a model-driven app, what is the purpose of the 'App profile' feature in the App profile manager?
- Controls which Power Platform environment the app connects to
- Defines which tables, forms, views, and dashboards are available to specific security roles in the app (Correct answer)
- Sets the color theme and logo for the app
- Manages API rate limits for the app's users
Correct answer: Defines which tables, forms, views, and dashboards are available to specific security roles in the app
App profiles allow administrators to tailor the model-driven app experience for different user groups by controlling visible tables, forms, views, and dashboards.
Question 6: Which method would a developer use to get the current value of a lookup field on a model-driven app form using the Client API?
- formContext.getAttribute('fieldname').getValue()[0].id (Correct answer)
- formContext.data.entity.attributes.get('fieldname')
- Xrm.Page.getAttribute('fieldname').getText()
- formContext.ui.controls.get('fieldname').getValue()
Correct answer: formContext.getAttribute('fieldname').getValue()[0].id
Lookup fields return an array of objects; getValue()[0].id retrieves the GUID of the first selected lookup record.
Question 7: What is the role of the 'Solution layers' feature when troubleshooting a model-driven app customization conflict?
- It shows the order of plug-in execution for a given message
- It displays which solutions have modified a component and in what order, revealing which layer is active (Correct answer)
- It lists all users who have modified a component
- It shows the Git commit history for a solution
Correct answer: It displays which solutions have modified a component and in what order, revealing which layer is active
Solution layers show each solution that has customized a given component and which layer is currently active, helping developers diagnose customization conflicts.
When customizing a model-driven app command bar using modern commanding, which language is used to write the action logic for a button?