Transform script log update
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2017 12:08 PM
Hi,
I need help with the transform script logs. Currently I am updating a bulk of assets and I need to put in logs to check.
I need logs to check which assets have been updated and which assets have not been updated in the transform.
Any suggestions are welcome.
ty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2017 11:30 AM
HI,
Below is the after code I have used, it did not return me the values of the asset serial numbers.
var rc = new GlideRecord("alm_asset");
gs.log('The asset with the following serial number is updated: ' + rc.serial_number);
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2017 11:43 AM
Hi Roger,
You can refer the target record as target., in this case you can just use target.serial_number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2017 12:21 PM
HI Karthik,
will this work?
gs.log('The asset with the following serial number is updated: ' + target.serial_number);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2017 12:25 PM
Yes Roger, it should. I have similar statements in my transformation scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 05:09 AM
HI Karthik,
But the catch is that I need only logs for the updated records.
The above script will trigger logs even if the asset is not updated(error).
Thanks.