can we hide custom button using onchange client script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2023 09:59 PM
Hi Team ,
We created a custom button in the form .
My requirement is when user changes the state field ,we are making few fields blank and want to hide/disable the custom button .
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
g_form.setValue('date', "");
g_form.setValue('last_com', "");
we are making few fields blank ,but how to make custom button hide/disable ?
Please guide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2023 12:13 AM
Hi @Samaksh Wani tried in Scope application ,still no luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2023 12:18 AM
Hello @String
- Accessible from is set to All application scopes
- Can read is selected
- Allow configuration is selected
You need to check in UI Action or UI Policy that it should be accessible from all application scope.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2023 10:55 PM
Hi @String ,
UI actions don't work that way, you can better add a check in the client script, so even if the user clicks on the UI action, it reads the form values and gives a user error to the user that you can't perform this action since these fields are empty or something about the state.
Aman Kumar