Update Multiple Companies from One Company

SOLVED

Hi All,

I need to do the following:

Update multiple company from one company.

Lets say I have company A, B, C, D, E.

Login in Company A, I add new customer and company B,C,D,E must add the same new customer, and vice versa.

Is it possible to do it using the Sage 200 assemblies library?

If anything that I can found regarding companies is just getting the companies name and its database name using Sage.Common.ApplicationInterface.ICompanyProxy.

My alternative solution is based on reference in https://my.sage.co.uk/Sage200SDKDocs/html/DOC0093_Overview.html.

With only company name & database, I am planning to get the credential using Sage.Common.Credential.DatabaseCredential, use raw query to insert new row in other database. But then I have to know which exact tables to insert. Is this solution acceptable?

Thank you in advance.

  • +1
    verified answer

    Hello murni 

    Thank you for your question. 

    Although it is possible to use SQL to directly update the database, the developer services team would not recommend this. 

    Instead we would suggest going through the business objects to ensure your new customers are hitting the relevant logic and are updating the correct fields. 

    For updating multiple companies through the software development kit you would need to use the application object to connect to each company one at a time. Creating the new customer in each, one after another.

    Connecting then ensuring to disconnect accordingly before moving to the next. 

    The following link to our help documentation demonstrates how connecting to a company through the application object can be achieved 

     https://my.sage.co.uk/Sage200SDKDocs/html/DOC0001_Example.html