How to identify if a record is created via a robust transform map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 01:43 AM - edited 11-28-2023 04:46 AM
We have an airWatch ServiceNow integration with service graph connector plugin approach. It has a robust transform map and primary key for handheld devices are via IRE of cmdb. Can I know how we can find out if the data/record is created for the first time via this intgeration? Based on that, if it's created for the first time i need to make a field as personal. Can Someone help to achieve this.
- Labels:
-
Service Graph
-
Service Graph Connector
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 06:53 AM
When records are created via RTE, there is a corresponding record entered into sys_object_source to tie the RTE to the target records. You could leverage this for your trigger. Or, you could go to the transform definition itself because there are now options to run before and after scripts there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 06:57 AM
For onbefore script I tried this way.
Will this be fine..any suggestions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 07:07 AM
This site shows what is available for the script fields: https://docs.servicenow.com/bundle/tokyo-platform-administration/page/administer/import-sets/task/cr...
I would test to see if the if(action == 'insert') is a valid option in the script here, as that is the simplest way. You shouldn't have to for loop it, it is going to run the script for each row oob from what I'm seeing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 08:14 AM
Am getting bellow error when using action == 'insert'
Before script unable to process records with error message: "action" is not defined. |