- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2016 04:37 AM
Thank you! I thought I needed a script include for a business rule as well (like I said, still new at this!). But this worked! I had to change the values a little bit to:
var gr = new GlideRecord('u_assignment_record');
gr.initialize();
gr.u_number = current.sys_id;
gr.u_assigned_from = previous.assigned_to;
gr.u_assigned_to = current.assigned_to;
gr.u_assigned_by = gs.getUserID();
gr.insert();
And I removed the second condition, since I do want to track if someone change the value to nothing, but other than that, it works perfectly!
Can you just answer one more question for me? Just to make sure I understand...the reason I don't need a script include from a business rule is because it runs server side already, correct? Would there be any reason I would ever call a script include from a business rule at all (in a different case, not this one)?