- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 03:21 AM
Hi Team,
I have a requirement , when incident/request created to related Case then only make visible resolution information section on case record. If incident not created then I need to make invisible entire resolution information section and if request created then I need to make resolution information section visible but under this section I need to hide "Resolution Code" field. Can anyone help me on this requirement . Thanks in advance.
Case have either Incident or Request only
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2023 12:27 AM
Dear @Pandu3
Please use the below :
1. Client Script On Load on the case request
var gaRequest = new GlideAjax('checkParentExists');
gaRequest.addParam('sysparm_name', 'getParent');
gaRequest.addParam('sysparm_parent', g_form.getUniqueValue());
gaRequest.getXMLAnswer(checkParent);
function checkParent(answer) {
alert(answer);
if(answer == 'true'){
g_form.setSectionDisplay('resolution_information',true);
g_form.setVisible('resolution_code',false);
}else{
g_form.setSectionDisplay('resolution_information',false);
}
}
Script Include - client callable
- Kailas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 10:08 PM
Dear @Pandu3
Please help me in case you have request field in the case form.
- Kailas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 11:08 PM - edited 05-11-2023 05:52 AM
Dear @Pandu3
Please write another UI Policy with condition Request is empty
Write the script in the Execute if True
g_form.SetSectionDisplay('resolution_information', false) //give correct section name
Write the script in the Execute if False
g_form.SetSectionDisplay('resolution_information', false)
g_form.setVisible('resolution_code',false);
- Kailas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 09:30 PM
Dear @KB18 ,
Can you please guide me how to check the "Request is Empty" condition on case form through UI policy.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 09:38 PM
Dear @Pandu3
As per your request, I believe you have request field (Refence field to sc_request table) in the Releated Record section in the case form. use that request field in the condition..
- Kailas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 10:11 PM