Avoiding Bundle Installation Errors due to Duplicate External IDs

The following steps provide an example of how an issue with duplicate external IDs may cause an unexpected error during bundle installation from a sandbox account to a production account:

  1. Create a custom record with the script ID recorda in a production account, then create a custom record with the same script ID in a sandbox account manually or through a sandbox refresh.

                  Production:
                Custom Record - recorda
                                instance1
                                instance2
                                instance3
    
    Sandbox:
                Custom Record - recorda 
    
                
  2. Assign external IDs to the custom record values in the production account using SuiteScript or web services, for example ext1, ext2, ext3.

                  Production:
                 Custom Record - recorda
                                 instance1  ext1
                                 instance2  ext2
                                 instance3  ext3
    
    Sandbox:
                 Custom Record - recorda 
    
                
  3. In the sandbox account, assign external IDs to the custom record values using SuiteScript or web services.

    In this example, the custom record values in the sandbox account have different script IDs than the custom record values in the production account, but they have the same external IDs ext1, ext2, and ext3.

                  Production:
                Custom Record - recorda
                                instance1  ext1
                                instance2  ext2
                                instance3  ext3
    
    Sandbox:
                Custom Record - recorda
                                instance4  ext1
                                instance5  ext2
                                instance6  ext3 
    
                
  4. Bundle the custom record in the sandbox account and install the bundle to the production account.

    During bundle installation, there is a script ID conflict because custom record recorda has the same script ID in the production account and the sandbox account.

    On the Preview Bundle Install page, select Replace Existing Object option to replace custom record recorda in the production account with custom record recorda from the sandbox account.

    In this case, the custom record values are not matched between the production account and the sandbox account because the custom record values have different script IDs in the production account and the sandbox account.

    Instead, the custom record values instance4, instance5 and instance6 are added to the production account. The addition of these record instances causes a conflict of duplicate external IDs among custom record values in the production account that causes the bundle install to fail with an unexpected error.

                  Production:
                Custom Record - recorda
                                instance1  ext1
                                instance2  ext2
                                instance3  ext3
    
                                instance4  ext1
                                instance5  ext2
                                instance6  ext3
    
    Sandbox:
                Custom Record - recorda
                                instance4  ext1
                                instance5  ext2
                                instance6  ext3 
    
                
  5. To fix the bundle installation error in the production account, you must match the custom record values between the production account and the sandbox account by external IDs, and rename the script IDs of sandbox account custom record values using the script IDs of production account custom record values that have the same external IDs.

    In this example, the custom record values in the production account are renamed from instance4, instance5, and instance6 to instance1, instance2, and instance 3, allowing the bundle installation to proceed and match the custom record values between the sandbox account and the production account correctly.

                  Production:
                Custom Record - recorda
                                instance1  ext1
                                instance2  ext2
                                instance3  ext3
    
    Sandbox:
                Custom Record - recorda
                                instance1  ext1
                                instance2  ext2
                                instance3  ext3 
    
                

To avoid unexpected errors during a bundle installation from a sandbox account to a production account due to duplicate external IDs:

  1. Log in to your sandbox account.

  2. Go to Setup > Company > Enable Features and enable the SuiteCloud Development Framework feature on the SuiteCloud tab.

  3. Go to Home > Set Preferences and enable Show ID Fields on Sublists.

  4. Open the custom record.

  5. Click Manage Values.

  6. Go through each custom record value and click Edit, then click Change ID.

  7. Rename the script IDs for sandbox account custom record values using the script IDs of production account custom record values that have the same external IDs.

  8. Update the bundle. During bundle update, custom record values are matched between the sandbox account and the production account so the bundle installation proceeds correctly.

Note:

This same fix is also applicable for custom segments that may have duplicate external IDs.

Related Topics

SuiteApps and Sandbox Accounts
Single Sandbox Bundle Deployment Model
Two Sandbox Bundle Deployment Model
Sandbox Refresh Impact on Bundles
Selective Update of Sandbox Bundle Objects
Dissolving Bundles Created in Sandbox

General Notices