- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2023 03:13 AM - edited ‎08-16-2023 03:16 AM
Hi All,
I am working on Problem Management,
I have a requirement,
1. When the User creates any kind of change by Right Click > Create Change (Normal, Standard, Emergency)
(Basically using the UI Actions)
on the problem form then it should be shown in the related list of that problem.
2. Secondly we have to restrict the user go ahead in the Fix in Progress state of the Problem form if the Change Requested attached to the problem table has not been closed.
I have added the screenshots as well to get a clear picture of this.
Thanks In advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2023 03:19 AM
Hi @Atik for the first query Can you please update your UI action code to capture the Problem sys_id for the parent value on change request and For the second one Can you Please write a Before Business rule on Problem table for Update operation and in Filter state changes to Fix in progress and Change is not empty, In the script
write as below
var cr = new GlideRecord('change_request');
var sys = current.sys_id;
//cr.addQuery('parent',current.sys_id);
cr.addEncodedQuery('parent=sys^state=3');
cr.query();
if (!cr.next()) {
current.setAbortAction(true);
gs.addErrorMessage('Put your error msg');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2023 03:19 AM
Hi @Atik for the first query Can you please update your UI action code to capture the Problem sys_id for the parent value on change request and For the second one Can you Please write a Before Business rule on Problem table for Update operation and in Filter state changes to Fix in progress and Change is not empty, In the script
write as below
var cr = new GlideRecord('change_request');
var sys = current.sys_id;
//cr.addQuery('parent',current.sys_id);
cr.addEncodedQuery('parent=sys^state=3');
cr.query();
if (!cr.next()) {
current.setAbortAction(true);
gs.addErrorMessage('Put your error msg');
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2023 03:25 AM
Hi @Atik ,
When a Change request is created from problem, Parent field is not being set in the Change request, which should be the problem ticket. Once the parent field is set it will show up in the related list.
So you will need to customize the UI action script and add one line:
Aman Kumar