Error: "The Sage CRM SQL Server and Database Name already exists for another Sage CRM Instance ID" when making changes to the CRM Server Options or Company Options in Sage 100 ERP
Description
Cause

The issue usually occurs in Sage 100 ERP versions 2013 or higher when Sage 100 ERP data has been migrated and converted from an older version with one or more companies which had the Sage CRM module unintentionally activated in the older version (for example by making a copy company of the live company).

Resolution
[BCB:1:Backup warning:ECB]

To resolve the issue it is necessary to remove any CRM module data for any company in which the CRM module was unintentionally activated in the older version (Pre-2013 Sage 100 ERP) prior to migrating data:

  1. After backing up Sage 100 ERP (formerly MAS90/200) in the older version, select Library Master, Main, Company Maintenance for every company and check if the Customer Relationship Management module is installed
  2. As the Customer Relationship Management module should normally only be active in one company: 
    • For each company that had CRM module incorrectly activated, you would Remove that module and data, leaving eventually only the one company that should have CRM active as showing with Customer Relationship Management module in Company Maintenace

Note: The above steps would need to be done prior to migration and conversion of company data to the newer Sage 100 ERP.

If migration has been completed and re-migration is not an option, it may be necessary to cleanup the existing CRM Server Options and Company Options in the new Sage 100 ERP:

  1. In Sage 100 ERP, copy details of the CRM Server Options (Customer Relationship Management, Main, CRM Server Options) or take a screen shot
  2. You may need to check several instances (if they are valid) to get details
  3. In Sage 100 ERP, copy details of the CRM Company Options (Customer Relationship Management, Main, CRM Company Options) or take a screen shot
  4. Backup the entire MAS_SYSTEM folder in Sage 100 ERP (...\mas90\mas_system)
  5. Backup the CRM SQL database
  6. Warning: All users should exit Sage 100 ERP and CRM while steps below are being performed.
    • All users must be out of Sage 100 ERP and CRM for the Rebuild CRM (rebuild of mirror tables) utility to run 
  7. In SQL, do a query to see the contents of the MAS_CRMServerOptions table within the CRM database
  8. Using SQL command, Truncate the table MAS_CRMServerOptions (Truncate Table MAS_CRMServerOptions)
  9. In SQL, do a query to see the contents of the MAS_Company table within the CRM database
  10. Using SQL command, Truncate the table MAS_Company (Truncate Table MAS_Company)
  11. In Sage 100 ERP, using Library Master, Utilities, Data File Display and Maintenance, remove the records from CU_MAS_COMPANY.M4T for all instances
    • The record should look like:
    • Key=[00011]   "SageCRMInstanceID:MAS_CompanyID"
    • 1 SageCRMInstanceID$.. [0001]
    • 2 MAS_CompanyID$...... [1]
    • 3 MAS_CompanyName$.... [ABC Distribution and Service Corp.]
    • 4 MAS_CompanyKey$..... [0000000001]
    • 5 MAS_CompanyCode$.... [ABC]
    • 6 DateTimeStamp$...... [2014-07-29T00:49:46.718]
    • 7 Updated$............ [N]
    • 8 ComputerName$....... [machine]
  12. Using Library Master, Utilities, Data File Display and Maintenance, remove the records from CU_Options.M4T for all companies
  13. In the new Sage 100 ERP select Customer Relationship Management, Main, CRM Server Options and choose Delete for existing instances that are causing conflicts
  14. Set up a new instance using Customer Relationship Management, Main, CRM Server Options which matches the server and database information you want to link together (you can use the screenshot you saved earlier or your notes for reference) 
  15. If you click Accept to CRM Server Options it should prompt for a Rebuild of Mirror Tables (Rebuild CRM) as necessary
  16. You can select OK to continue or manually run the Rebuild (within Sage 100 ERP, select Customer Relationship Management, Utilities, Rebuild CRM to rebuild the CU files)
  17. Sage 100 ERP Integration Engine will need to be stopped for the Rebuild CRM utility to continue
    • Warning: all users must be out of CRM and Sage 100 ERP in order to do run the Rebuild CRM utility (rebuilds mirror tables for Sage CRM and Sage 100 ERP)
  18. Once the Rebuild CRM is complete then you can restart the Sage 100 ERP Integration Engine
  19. Set up the Company Options for the correct company by logging into that company in Sage 100 ERP and then selecting Customer Relationship Management, Main, CRM Company Options
  20. Setting up CRM Server Options and CRM Company Options in Sage 100 ERP with the Rebuild CRM complete should populate the following:
    • In CRM database in SQL: MAS_CRMServerOptions, MAS_Company tables
    • In Sage 100 ERP: ...\mas90\mas_system\CU_CRMServerOptions, ...\mas90\mas_system\CU_MASCompany, ...\mas90\mas_system\CU_Options, and ...\mas90\mas_system\CU_Company
  21. Once complete, users may access Sage 100 ERP and CRM

 

Steps to duplicate
Related Solutions