Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Creating new account resutls in Invalid Insert - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Creating new account resutls in Invalid Insert
KB0831270

Creating new account resutls in Invalid Insert


2704 Views Last updated : Feb 27, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

When creating a new customer_account record, there is an "Invalid Insert" error and the record is not saved.

Release

All Releases

Cause

The customer_account table has three fields that require unique values, one is the account code. This field is creating with a default value that is determined by the last used value. The 'last used' value is stored in the com.snc.cs_base.last.generated.code.tree.path system property. If the property is reset to the original value, it will attempt to create new accounts with an account code that is already in use.

Resolution

Identify the last used value for the account code field on the customer_account table and update the com.snc.cs_base.last.generated.code.tree.path system property with that value.

Related Links

Update the com.snc.cs_base.last.generated.code.tree.path sys_property with the correct value
You can get the value by sorting the record list in descending order based on account_code and the first record will be the one with higher lexical order
So, To get the latest code that is generated :
Go to accounts
Add Account Code field in the list view
Sort the list in descending order based on "Account Code" Field
The account code of the first record is the last generated code

* More Details :
* How new account code gets generated - account_code is generated based on the pattern "!#$&()*+,-.0123456789:;<?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]`}|{~" and sys_property com.snc.cs_base.last.generated.code.tree.path
For e.g.: if value in sys_property is !!!#, the next value for account code will be !!!$.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.