How to set Assignment Group of catalog item/ritm based on users location

aimughal
Tera Contributor

I have 3 catalog items, and based on their location of the user who submit. the ritm either need to be assigned to {Group 1} or {Group 2}. How can I write a script/BR for this to work? I know workflows can be used for this too, but I dont have any experience with those, if that is a more efficient way then please let me know.

1 ACCEPTED SOLUTION

Hi @aimughal 

 

Apologies, I misread the question and the example above is for an INC. for an RITM the code would be

 

if(current.request.requested_for.location == '[sys_id+of_location]'){
  current.assigment_group = '[sys_id_of_group_1]'
} else {
  current.assigment_group = '[sys_id_of_group_2]'
}

 

 

View solution in original post

5 REPLIES 5

Thank you so much!!