Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

A record insert triggers the update process

trangdan106
Tera Contributor

Hello everyone, I have encountered a very weird situation where I have inserted a record but it trigger the update process. 

The field being effected is the "state", I've check the audit history and there is only 1 record of the state with the update number being 1. From this post Meaning of update number in history i know that if a record was to created it would be 0. However, this time, the record is created (only 1 record for the audit) but the update number is 1.

trangdan106_1-1790844098081.png

 

I am wondering what can cause this? It can't be a an insert BR that update it the same time cause it will be in the insert transaction, right?

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@trangdan106 

it means some update actually happened on that.

did you debug business rule and see?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

If some update happened, I would expect the audit of the state to have more than 1 records.

 

I did create a Before Update BR running at -10 order, used .changes() function, check previous value, etc. The state field has a default value which will set it at "Open", using the .change() function, I got the previous value is null and the current value is Open.

I also createa Before Insert BR and the result is the same, previous = null and current = "Open". 

@trangdan106 

my thoughts

-> The single audit entry (Old = empty, New = Open) suggests the value was set during record creation (default value, before insert BR, data policy, etc.), not necessarily by a subsequent update.

Things to check

  • Check if State has a dictionary default value (Open).

  • Review:

    • Before Insert BRs
    • After Insert BRs
    • Flows
    • Workflows
    • Script Actions / Events
    • Transform Maps (if imported)
  • Log current.operation() in your BR to confirm whether the transaction is truly insert or update.

💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader