- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 10:38 AM
Hello,
I am wondering if there is a way to stop the updating time and updated by from being updated when using import sets. I know you can use "autoSysFields(false);" when using scripts but it doesnt seem to be working for import sets.
Any help will be appriciated!
Thank You!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 01:34 PM
On the transform map form, there's a checkbox "run script". Check the box and an input box will open up in which you can enter code that will run for every record in the import set. You can do any kind of server side processing necessary in there. Seems like maybe you have some field mappings that you're coalescing on, and those records are being updated. Well, instead of that, just write a GlideRecord query in the script, and if you find the record existing, use the autoSysFields function to suppress the sys field updates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 01:13 PM
Hi Darrell - are you running an import set script, locating an existing record and updating it?
GlideRecord.autoSysFields(false) should work for that case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 01:20 PM
Thanks! Where would I put that though? Since I am using a transform map with a data source?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 01:34 PM
On the transform map form, there's a checkbox "run script". Check the box and an input box will open up in which you can enter code that will run for every record in the import set. You can do any kind of server side processing necessary in there. Seems like maybe you have some field mappings that you're coalescing on, and those records are being updated. Well, instead of that, just write a GlideRecord query in the script, and if you find the record existing, use the autoSysFields function to suppress the sys field updates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 02:07 PM
Awesome this worked for me.
Appreciate the help!