- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-16-2021 10:03 PM
Need to set value of choice list field which is present on change task when change request is change .
when change move from one state to another .set choice field value in change task .
Example:
if change task has choice field "abc" with value as 1,2,3. also change state is in authorized state and task choice field abc value is 2.when change is moved from authorized to schedule state "abc" value should switch from 2 to 1.
How to implement this scenario.
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-17-2021 02:36 AM
Hi,
BR should be on change_request table
Condition:
State [Changes From] Authorized
AND
State [Changes To] Scheduled
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var chgTask = new GlideRecord('change_task');
chgTask.addQuery('change_request', current.sys_id);
chgTask.query();
while(chgTask.next()){
chgTask.u_confirmation = 'released';
chgTask.update();
}
})(current, previous);
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
ā02-17-2021 02:36 AM
Hi,
BR should be on change_request table
Condition:
State [Changes From] Authorized
AND
State [Changes To] Scheduled
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var chgTask = new GlideRecord('change_task');
chgTask.addQuery('change_request', current.sys_id);
chgTask.query();
while(chgTask.next()){
chgTask.u_confirmation = 'released';
chgTask.update();
}
})(current, previous);
Regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader