- 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-10-2023 04:23 AM
tested with UI policy the first requirement (if no inc, hide the tab)
condition: incident field is empty (related record field 'Incident(incident)' )
script
result
rule inactive:
modify the condition to include the request 🙂 hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 07:27 AM
Hi Jori Simola,
Thanks for your quick replay.
I already implemented the first condition it's working .
Need help on second condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 01:16 AM
Good to know it helped 🙂 please elaborate the resolution code hiding idea. are you going to sync the code with some business rule from the request after the request is completed, if it needs to stay hidden?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 09:42 PM
My exact requirement was, While new case creation need to hide the Resolution information section. After incident/ Request creation then only need to show Resolution information section.
if incident created then need to show entire section and no need to hide any fields.
if Request created then need to show entire section but I need to hide Resolution code field under Resolution information section.
NOTE: If I create the request then it will create the Case automatically.
- Case(parent)--->Request or Case(parent)--->Incident.
Thanks.