
Good Day,
I have a custom button created on a ribbon, I need to show or hide this button based on a specific value on the field.
I have tried using JScript on the command with a function that does this but it is not working, this hide the entire ribbon.
I have also tried creating display rule and check for a value but this still hides the entire ribbon as well.
Not found any relevant site to do this and each one points exactly what I have done.
Remember the field that I am checking on the form for display of the button is a custom option set field.
I am setting the field properly on the JScript and on the display rule but I still have not found any joy in this.
Why does my display rule, or even my scripts on the command hide the entire ribbon, what I am doing wrong?
Is there a prescribed way step by step guide I can follow to get this done?
Hi,
You need to use enable rule to hide and display button. you can bind the javascript function which returns true(show) and false(hide) the button.
1. Create Enable Rule
2. Add Step > Custom Rule
3. In Custom rule Set Default Value to false if you want field to be hidden initially
4. Function Name : Your function name (function has logic to return true/false based on field value)
5. Library : library is web resource where you function resides.
then add enable rule in command of your custom button.