Q: 3
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.
Options
Discussion
Would C ever update the ribbon if called right after a save event?
B and D, encountered exactly similar question in my exam. Only those two will actually refresh the ribbon for business rule changes.
Both B and D use formContext.ui.refreshRibbon, which is needed to re-evaluate button visibility tied to business rules. The others don’t refresh the ribbon, so wouldn’t work in this scenario. I think that's right, correct me if I missed something.
I don’t think C is right here. B and C look similar but only B actually refreshes the ribbon for button visibility, pretty sure.
B and D for sure, only those actually refresh the ribbon for business rule checks. The others don’t interact with the ribbon at all from what I remember in my practice sets. I think that's right but open if someone’s seen otherwise.
Nah, I think B and D. A is a common distractor here but doesn't refresh the ribbon for button visibility.
Don’t think it’s C, D is better. formContext.data.refresh runs a data refresh but doesn’t trigger the ribbon evaluation for business rules, so for updating ribbon visibility, D fits.
B/D? Not totally sure since gridContext sometimes throws me off, but the ribbon refresh methods match what I’ve seen in docs.
D imo, but does the question mean visibility based on real-time values or after save only? If it's about immediate UI changes without save, B and D make sense-just double-checking the scope.
Option B and D
Be respectful. No spam.