Need to dynamically hide Order Now button in Service Catalog?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2017 01:52 AM
I need to dynamically hide Order Now button in Service Catalog?
My script checks for the status of a field in the related table and if it finds the matching status, it should hide the Order Now button. Please help me to achieve this.
Here is my script along with the screen shot but it doesn't work.
Catalog Client Script Onchange
function onChange(control, oldValue, newValue, isLoading) {
var caller = g_form.getReference('nh_new_user', doAlert);
function doAlert(caller) {
g_form.setValue('profile',caller.u_equipment_profile);
if(caller.u_state == "Processing")
{alert("Manager Checklist for this User has already been Submitted");
$('order_now').hide();
}
}
}
This doesn't work, I can hide it by directly going to the catalog item and check no order to true but that hides it permanently.. where as I want to dynamically hide it.
Please help
Regards,
Raju Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2017 04:15 AM
I dont get any value for this field.. alert(caller.u_state);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2017 04:27 AM
Write Callback Function outside the OnChange Function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2017 05:37 AM
I m not sure how to do that Nayan,, could you help me here please..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2017 05:39 AM
function onChange(control, oldValue, newValue, isLoading) {
var caller = g_form.getReference('nh_new_user', doAlert);
}
function doAlert(caller) {
g_form.setValue('profile',caller.u_equipment_profile);
alert(caller.u_state);
if(caller.u_state == "Processing")
{alert("Manager Checklist for this User has already been Submitted");
$('order_now').hide();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2017 08:48 AM
No. luck Nayan.. its still the same