- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 10:18 PM
I have a transform Map in which I had made field(ST_ID is the field name) as Coalesce, so that only matching records gets updated when user export the excel file and updates it.
I want the transform map not to update or stop updating, when a specific field(ST_Validation_ID) has 'no records' / blank, show the error message about it while transform.
Below is the transform map script :
if(source.ST_Validation_ID == ''){
error= true;
error_message = 'Validation ID is empty.';
}
if(action == 'insert'){
ignore = true;
}
i add log statements in 1, 2, and 5th line but it is not showing any message.
Regards,
Surya
Solved! Go to Solution.
- Labels:
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 10:23 PM
Hi Surya
the following is what the documentation states regarding logging in transform maps:
The log object for the current import run. Use this object to log messages such as log.info("<Message>") or log.warn("<Message>"). This object logs to the import log for standard import sets, or other log locations as required, such as for web service imports.
source: http://wiki.servicenow.com/index.php?title=Creating_New_Transform_Maps#gsc.tab=0
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 10:23 PM
Hi Surya
the following is what the documentation states regarding logging in transform maps:
The log object for the current import run. Use this object to log messages such as log.info("<Message>") or log.warn("<Message>"). This object logs to the import log for standard import sets, or other log locations as required, such as for web service imports.
source: http://wiki.servicenow.com/index.php?title=Creating_New_Transform_Maps#gsc.tab=0
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 11:16 PM
Hi Berny,
In the fist line for testing purpose i add log.info("1"); iam not getting any message .
Regards,
Surya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 11:18 PM
ok. and that's within a field map script?
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 11:33 PM
correct