Announcements
Hello Community,
I have a custom entity. I added 2 custom buttons. I added display rule but I think so this is not run right. I want to do when two buttons appear at the onload of the form. After the form is saved, if the job started, "Job Start", if the job done, "Jobe Done" button to hide. So while one button is visible, the other is invisible.
Hi Leah,
Greate, resolved! Thank you so much
Hi Onur,
As your screenshot shown, you have two field to control two buttons Separately, you can set them like following screenshot.
For JobStart button:
For JobDone button:
And just add refersh js code to onSave event.
Test:
when field value is yes, the button can show, if it is no, the button will be hidden.
if you still can't achieve it.
1.you can move button to the front of the bar.
2.you can try to use 'value rule' of 'enable rule' to test again.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
Hi Leah,
Thank you so much for your good explanation. I think so I skipped a point :(
My 2 fields are two options type. Both of us default value false. So they cannot be empty. I tried all the your stages. Both buttons are hidden. I share what I have done below. Can you fix it if I did it wrong? I'll be glad, if you help me :)
1. I added your shared script
2. I added function jobstarted field onchange
3. I added onsave
4. Create display rules for Job Start Button
5. Create display rules for Job Done Button
6. I was tried.
So thanks.
Hi Onur,
1..Add refresh javascript code to the job field onChange event.
(1)Js code:
function refreshRibbonOnChange() { Xrm.Page.ui.refreshRibbon(); }
(2)Add js as web resource.
Go Settings > Customizations > Customize the system > Web Resource.
(2) Add it to the field onChange event.
Go Settings > Customizations > Customize the system > entities > entity you need > forms to open main form, then click 'Form Properties'.
if you want to show changed after clicking save button, you can add it to the onSave button.
2.You need do following settings in ribbon workbench.
(1) Set Job Start button.
(2) Set Job Done button.
3.Test.
(1)Job field is null.
(2)Job field is not null.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
André Arnaud de Cal...
294,120
Super User 2025 Season 1
Martin Dráb
232,871
Most Valuable Professional
nmaenpaa
101,158
Moderator