If there is a way to modify the workflow wherein if the user is brazil then the request assign BAG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2023 12:57 AM
Hi Community,
If there is a way to modify the Existing workflow wherein if the user is Brazil then the request should land to Brazil Assignment group
Please check this above screenshot and advise how can we modify the above workflow?
Regards,
Srinivasu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2023 01:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2023 01:26 AM
Hi @Srinivasu2
What is your need ...??
Is it checkout by someone else & you are not able to modify it ...?
or do you want to know how to set assignment group depending upon location ?
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2023 01:55 AM
Hi @Vishal Birajdar,
I will tell somebody to publish this workflow, than i can edit this in dev instance, that's Ok
But Client ask us to modify this workflow if Brazil user submit this catalogue item, request should be auto assigned to Brazil assignment group, if other users submit this catalogue item workflow will continue with other activities
Regards,
Srinivasu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2023 02:13 AM
Hi @Srinivasu2
Assuming you are talking about assignment group on sc_task to be updated.
You can write script in catalog task activity
// Set values for the task in this script. Use the variable 'task' when setting additional values.
// Note: This script is run after the task values are set using the Fields, Template or Values you have specified.
//
// For example:
// task.short_description = current.short_description;
/*1.Get the requested for*/
var reqFor = current.requested_for;
/*2.glide record on sys_user table*/
var country;
var grUser = new GlideRecord("sys_user");
grUser.addQuery("sys_id", reqFor);
grUser.query();
if (grUser.next()) {
country = grUser.location.country;
}
if(country == '<country_name here brazil>'){
task.assignment_group = <sys_id of brazil group>; //use system property to store sys_id. not to hardcode
} else {
task.assignment_group = <sys_id of another group>;
}
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates