Unable to Create New Account Record Due to Account Code LimitIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Unable to Create New Account Record Due to Account Code Limit Symptoms<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Unable to create new account records with errors: Account code not auto-generatingError: java.sql.BatchUpdateException: Duplicate entry for key account_pathAccount creation fails due to account code limit reachedSystem property com.snc.cs_base.last.generated.code.tree.path not updating correctly Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } all Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Primary Cause: 4-digit account code limit reached CSM uses a 4-digit account code sequence with the following character set: !#$&()*+,-.0123456789:;<?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]`}|{~ Character set size: 59 charactersMaximum unique IDs (4-digit): ~12 million (59^4)Issue occurs: When approaching or exceeding this limit Secondary Causes: Null account_path values - Some accounts have account_path set to nullOut-of-sync system property - com.snc.cs_base.last.generated.code.tree.path becomes desynchronized during: XML importsExternal API integrationsBulk data loads Incorrect property reset - Clearing the system property starts from "!!!!" which conflicts with existing codes Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Solution 1: Fix Null Account Paths (Immediate Fix) For accounts with null account_path: javascript // Fix single account with null account_path var accountSysId = 'ACCOUNT_SYS_ID'; // Replace with actual sys_id new global.generateCodeForTreePath().updateAccountPath(accountSysId); gs.info('Updated account_path for: ' + accountSysId); For multiple accounts with null paths: javascript // Fix all accounts with null account_path var gr = new GlideRecord('customer_account'); gr.addNullQuery('account_path'); gr.query(); var count = 0; gs.info('Found ' + gr.getRowCount() + ' accounts with null account_path'); while (gr.next()) { new global.generateCodeForTreePath().updateAccountPath(gr.sys_id); count++; // Log progress every 100 records if (count % 100 === 0) { gs.info('Processed ' + count + ' accounts...'); } } gs.info('Completed: Fixed ' + count + ' accounts'); Solution 2: Reset System Property Correctly CRITICAL: Do NOT simply clear the system property value. Correct approach: Navigate to Customer Service > AccountsSort by Account Code in DESCENDING order (highest codes first)Note the highest account code value (e.g., "AS!!")Navigate to System Properties > sys_propertiesSearch for: com.snc.cs_base.last.generated.code.tree.pathSet value to the highest account code (or one value higher for safety)Create a test account to verify auto-increment works javascript // Script to find highest account code var gr = new GlideRecord('customer_account'); gr.orderByDesc('account_code'); gr.setLimit(1); gr.query(); if (gr.next()) { var highestCode = gr.getValue('account_code'); gs.info('Highest Account Code: ' + highestCode); gs.info('Set system property com.snc.cs_base.last.generated.code.tree.path to: ' + highestCode); // Optionally set the property automatically gs.setProperty('com.snc.cs_base.last.generated.code.tree.path', highestCode); gs.info('System property updated'); } Solution 3: Extend to 5-Digit Account Code (Long-term Fix) Note: This is a workaround until the official fix in Australia release. Modify the generateCodeForTreePath script include to support 5-digit codes: Steps: Download the update set from the KB referenceTest thoroughly in non-production environmentsApply update set to production after validation Key changes in script include: javascript // In generateCodeForTreePath script include // Change MAX_DEPTH from 4 to 5 var MAX_DEPTH = 5; // Changed from 4 to 5 // This extends capacity from ~12M to ~700M+ unique IDs (59^5) Manual modification example: javascript var generateCodeForTreePath = Class.create(); generateCodeForTreePath.prototype = { initialize: function() { this.MAX_DEPTH = 5; // Extended from 4 to 5 digits this.CHARACTER_SET = '!#$&()*+,-.0123456789:;<?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]`}|{~'; }, // Existing methods remain the same updateAccountPath: function(accountSysId) { // Implementation }, type: 'generateCodeForTreePath' }; Future Enhancement: Official 5-digit support will be included in the Australia release.