- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
HI team ,
need help in script
I have a catalog item called ' SWA AD '
in that we have reference field ' Application Name ' which refers to cmdb_ci_service_auto table .
approvals has to trigger to the application service >> approval group
As this is old catalog already WF configured .
So i am trying to achieve via script
my scipr is not working
please help me what was the mistake
(function executeRule(current, workflow) {
var groupId = "";
if (current.u_application_name) {
var app = new GlideRecord("cmdb_ci_service_auto");
if (app.get(current.application_name)) {
groupId = app.change_control; // adjust field name
}
}
workflow.scratchpad.approvalGroup = groupId;
return groupId;
})(current, workflow);
could you please prrovide me the updates script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
update as this in your workflow advanced script for approval activity
answer = [];
answer.push(current.variables.u_application_name.change_control.toString()):
Approval - Group workflow activity
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
remove complete line of code before line 13 in script
Ensure that group has at least 1 member in it
It should work provided the variable name and field name is correct
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago