- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2018 06:07 AM
Hello all,
I have a field 'Recipients' on cmdb_ci_service table
type : list - referred to user table
my requirement is to dot-walk the field on the Outage table(cmdb_ci_outage). I was able to dot-walk the field just fine but it's not fetching the values from 'Recipients'(cmdb_ci_service).
How can this be achieved? Do i have to write a business rule for this? If yes,plz help me with the code.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2018 05:32 AM
OK, I made a mistake... it happens at 6AM. 🙂
Remove the condition and use this in the script instead. Same assumptions apply.
// If cmdb_ci has a value (not null)
if (current.cmdb_ci) {
// Get the cmdb_ci record
var ci = current.cmdb_ci.getRefRecord();
// if the cmdb_ci record is a service
if (ci.getTableName == 'cmdb_ci_service') {
// Copy the recipients from the service record to the outage record
current.u_recipients = current.cmdb_ci.u_recipients;
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2018 05:32 AM
OK, I made a mistake... it happens at 6AM. 🙂
Remove the condition and use this in the script instead. Same assumptions apply.
// If cmdb_ci has a value (not null)
if (current.cmdb_ci) {
// Get the cmdb_ci record
var ci = current.cmdb_ci.getRefRecord();
// if the cmdb_ci record is a service
if (ci.getTableName == 'cmdb_ci_service') {
// Copy the recipients from the service record to the outage record
current.u_recipients = current.cmdb_ci.u_recipients;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2018 06:41 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2018 07:53 AM
I recommend using the Script Debugger to set a breakpoint and see what's happening. You can analyze the variables, values, and logic as it runs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2018 10:12 AM
Hi Chuck Tomasi,
It's working now.
Thank you for your help.
The only correction i had to make is to add '()' to
ci.getTableName
Script Debugger helped a lot.. Thanks.