- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2022 08:21 PM
i have hide requested for variable in request item form by using ui catalog policy .but not able to hide in catalog task .i have try to do this by using ui policy and workflow variable set but its not work .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2022 01:35 AM
Hi,
update as this
function onLoad() {
//Type appropriate comment here, and begin script below
var itemSysId = g_form.getReference('request_item').cat_item;
if (itemSysId == '2ab8ba036fb99200b7b61abf1e3ee4eb')
g_form.setDisplay('request.requested_for', false);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2022 02:00 AM
Glad to help.
Please mark response helpful as well.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2024 10:27 AM - edited ‎03-14-2024 10:28 AM
Hi @Ankur Bawiskar ,
I have almost the same requirement. I have to hide approval and contact type field on the Requested Item table if catalog item is ABC.
I tried the above OnLoad script on requested item but it is giving error "cat_item is not defined".
Please help.
Sam