How to Add Conditional Ribbon Buttons in Model-Driven Apps Based on Privileges?
Table of Contents
Question
You are developing a model-driven app. You have a JavaScript function.
You need to add a button to the ribbon of the app. The button must only display for users who have the Create privilege for the current table JavaScript function return true. Evaluation of the privilege condition should be done on the server.
Which two rules should you create? Each correct answer presents part of the solution.
Select all answers that apply.
A. a Display rule of type EntityPrivelegeRule to check the Create privilege on the PrimaryEntity
B. an Enable rule of type EntityPrivelegeRule to check the Create privilege on the PrimaryEntity
C. a Display rule of type CustomRule to call the JavaScript function
D. an Enable rule of type CustomRule to call the JavaScript function
Answer
A. a Display rule of type EntityPrivelegeRule to check the Create privilege on the PrimaryEntity
D. an Enable rule of type CustomRule to call the JavaScript function
Explanation
This item tests the candidate’s knowledge of ribbon commands.
Display rules are executed server-side and do have the possibility to check for entity privileges. Enable rules are executed client-side and therefore can call a JavaScript function. There is no Enable rule of type EntityPrivilegeRule. This is only possible in Display rules. Display rules are executed server-side and therefore cannot call a JavaScript function.
Microsoft Power Platform Developer PL-400 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Power Platform Developer PL-400 exam and earn Microsoft Power Platform Developer PL-400 certification.