what is the name and where I can find these backend name?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2021 03:47 AM
Hi I am writing client script when I will click on save or update button then particular field on form should be hide and when I will click on the close task button then that particular field should be visible and mandatory and after selecting that field value and click on close task button then it will be close successfully. Please help me on this and I am attaching screenshots and give you that scripts.
function onSubmit() {
var actionClicked = g_form.getActionName();
if(actionClicked == "sysverb_update_and_stay" || actionClicked == "sysverb_update"){
g_form.setDisplay("u_purchase_or_deploy", false);
return true;
}else if(actionClicked == "closetask"){
g_form.setMandatory("u_purchase_or_deploy", true);
return false;
}
}
- Labels:
-
Service Desk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-31-2021 08:53 AM
Hi,
I think you have asked the same question in another thread. I would request you to please keep just one thread for same query.
https://community.servicenow.com/community?id=community_question&sys_id=2dac67d01b3c8554ada243f6fe4bcba7
I have already provided a solution in the other thread of yours, pasting it here again:
Regards,
Shloke
1) Write an On Submit Client Script on your catalog Task table and use the script as below:
In above script pass the correct Field name above and you should be good.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke