- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 03:53 AM
Hello!
I am trying to set some fixed values in reference fields like assignment group, location, primary configuration item. Our requirement is when incident tickets are generated from Dynatrace Integration, assignment group, location and CI should have the values X,Y and Z auto set. I tried using onLoad client script to set up these values, but it didn't work as expected. The onLoad script would work only after opening the tickets, hence I thought of using Before Business Rule.
We cannot set these values in Integration script itself because of some other requirement conflicts.
Here is my script:
(function executeRule(current, previous /*null when async*/) {
current.contact_type = "X";
current.location = "Y";
current.assignment_group = "Z";
current.update();
})(current, previous);
Any help would be highly appreciated!
Thanks,
Su
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 04:24 AM
Do you have group by name Z in your sys_user_group table. Please pass the exact name of group. Write before insert/update BR.
EX: Network is a group name
current.assignment_group.setDisplayValue('Network');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 06:07 AM
Yes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 04:17 AM
If you want to set it by it's name then you can make use of below function or else you can set it by sys_id
setDisplayValue("Z");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 04:21 AM
current.assignment_group.setDisplayValue("Z"); this didn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 04:24 AM
Do you have group by name Z in your sys_user_group table. Please pass the exact name of group. Write before insert/update BR.
EX: Network is a group name
current.assignment_group.setDisplayValue('Network');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 05:38 AM
Thanks a lot!
It worked 🙂