Cancel Insert on Before Insert Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2010 01:37 AM
Good morning!
Could someone please tell me if it's possble to stop a an insert of a record on a 'before insert' business rule?
Background:
We're currently improving our Active Directory and part of this we're going to start from scratch by importing our 3000 users with their staff ID as their username instead of their firstname.lastname
I don't want duplicate records or to lose the exisiting records. So what I thought is I could write a before insert business rule on the sys_user table which a function of matching the email address to the exisiting email address of a current record. If so, then it would update the current record with the 'source' and new User ID. Once updated, the insert will then be aborted. I've searched on Wiki and on the forums but I can't find any examples.
Can anyone help?
Many thanks in advance,
James

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2010 04:54 AM
I think this is what you're after...
http://www.servicenowguru.com/scripting/stopping-record-submission-servicenow/
I'm still not clear as to what exactly you're trying to do but if there's any way possible you should probably try to handle this on the import transform if the issue is related to the import. You can designate coalesce values there to only update records with a matching email address. You can also ignore certain records based on whatever criteria you specify.
http://wiki.service-now.com/index.php?title=Using_the_Coalesce_Field
http://wiki.service-now.com/index.php?title=Transform_Map_Scripts