exam questions

Exam PL-400 All Questions

View all questions & answers for the PL-400 exam

Exam PL-400 topic 3 question 26 discussion

Actual exam question from Microsoft's PL-400
Question #: 26
Topic #: 3
[All PL-400 Questions]

An organization uses Dynamics 365 Sales. You plan to add a custom button to the app ribbon.
You need to ensure that the button displays only when conditions specified by business rules are met.
Which two code segments can you use? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.

  • A. gridContext.refresh();
  • B. formContext.ui.refreshRibbon(refreshAll);
  • C. formContext.data.refresh(save).then(successCallback, errorCallback);
  • D. formContext.ui.refreshRibbon();
  • E. formContext.getControl(arg).refresh();
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
siddhu_47
Highly Voted 2 years, 7 months ago
No discussions. Have people stopped going through these questions ? :) Can anyone please confirm if the answers are correct.
upvoted 8 times
Moradmoro
1 year, 7 months ago
the answers are correct. Indicates whether all the ribbon command bars on the current page are refreshed. If you specify false, only the page-level ribbon command bar is refreshed. If you do not specify this parameter, by default false is passed. https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/formcontext-ui/refreshribbon#parameter
upvoted 3 times
...
Sakshi0510
2 years, 5 months ago
I too don't know :(
upvoted 1 times
...
...
Juan0414
Most Recent 1 month, 3 weeks ago
Selected Answer: BD
Example of using B or D. - A Business rule sets a value in a column - Button visibility rule depend on the value in the previous column - A JavaScript Web Resource is added to the on change event of the same column, so it gets triggered and executes either formContext.ui.refreshRibbon(refreshAll) or formContext.ui.refreshRibbon(), which refresh all ribbon command bars in the current page or only the page-level ribbon command bar, respectively (Both would work in this case) . This would ensure that the button is either displayed or not depending on the business rule.
upvoted 1 times
...
powerapps_923023
3 months ago
Selected Answer: BD
Answer is B and D for sure
upvoted 1 times
...
At09
7 months ago
Should be C and D by considering the business rule twist
upvoted 1 times
...
DummyTest1
9 months, 3 weeks ago
Selected Answer: BD
Answer seems to be correct as the both the variant would apply the rules for the command bar at the page level.
upvoted 1 times
...
ziadebada
1 year, 10 months ago
D is incorrect as no parameter is specified in formContext.ui.refreshRibbon(??); If you do not specify this parameter, by default false is passed.
upvoted 2 times
...
ShaiAtElad
1 year, 11 months ago
I think B and C. D will not refresh the button because it is was added to the app ribbon, so must pass RefreshAll. C because after refresh OnLoad event is triggered: https://docs.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/formcontext-data/refresh
upvoted 2 times
...
powerMaster
2 years, 1 month ago
https://docs.microsoft.com/de-de/powerapps/developer/model-driven-apps/clientapi/reference/formcontext-ui/refreshribbon looks correct
upvoted 1 times
...
jkaur
2 years, 2 months ago
Correct
upvoted 3 times
jkaur
8 months, 2 weeks ago
Should be B and C
upvoted 1 times
...
...
Anastasii
2 years, 5 months ago
It can't be other correct answers except for proposed variants.
upvoted 2 times
fihemal249
2 years, 5 months ago
How do you know? Answer E looks correct according to this link: https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/controls/getcontrol
upvoted 1 times
fihemal249
2 years, 5 months ago
And B should be the other correct answer: https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/formcontext-ui/refreshribbon
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago