How to set assignment group from a Catalog Item

jmbrake
Kilo Expert

I have a catalog item called "Self Assigned Task".   I have created a Reference field called "AssignGrp" for this catalog item, which looks up the assignment groups.   I would like to take the group selected during the Request process and have it follow through to the Task.   I am using a workflow to populate other fields down to the Task level, but I cannot get the Assignment group to pass to the task.   The top two lines work fine, the last one does not.   Any help would be appreciated

task.short_description = 'Perform this   ' + current.cat_item.getDisplayValue();

task.description = 'Perform this ' + current.cat_item.getDisplayValue();

task.assignment_group = current.variables.AssignGrp;

1 ACCEPTED SOLUTION

Hi Joan,


Could you try to find out if any other script is forcing blank value?


Might be some other business rule.



You can use field watcher for debugging purpose


http://wiki.servicenow.com/index.php?title=Field_Watcher#gsc.tab=0


View solution in original post

16 REPLIES 16

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Joan,



I think that script should work. Could you verify that the name of your variable is AssignGrp and that it's a reference variable to the group table?


I posted screen shotes of the field.   Below.   Does this confirm to your question?


var1.png


var2.png


Brad Tilton
ServiceNow Employee
ServiceNow Employee

It does and I don't see why it wouldn't be getting set. Does your assignment group field end up blank or populated with the wrong group? I'm wondering if there's some sort of business rule or assignment rule populating the field after you set it in the workflow.


It ends up blank.   The workflow is so basic that I have to believe something else is affecting it.   It Starts - Runs the Catalog Task script - and then it Ends