Adding specific nodes to MasContract File to sync records from Sage 100 ERP to Salesforce

By | September 30, 2020

In our previous blog we discussed, details about setting an Entity in Sage SData to sync from Sage to Salesforce. If a user/technical expert modifies the data definition/structure in Sage 100 ERP, Sage updates the data definition file (MASCONTRACT.xml) of SData to include schema of the updated data.

During the process, application also overrides definition of any added custom tables or files that are not included as part of the standard definition in the Sage SData file.

In this blog, we are specifying steps on how a user can add a GroupName in Sage 100 MasContract file. Which can be further used to sync records in Salesforce using GUMU™ Integration.

As you might know, Sage 100 ERP stores its records in Open and History table. GUMU™ Integration sync records from both the tables. But to import data from History of Sage 100 it is necessary to have link between 2 tables i.e.: Header and Details. Therefore it is essential to add a GroupName which acts as an inner join between two tables which can be further used in synching records from Sage 100.

For better understanding lets take the example of SalesOrders entity, Sales Orders when created in Sage 100 are stored in Open table and once Invoiced they are moved to History table. Since GUMU™ integration have the aptitude to sync history records as well, it is necessary to link Order Header and Order Details of Sage 100.

Sage Side Configuration & Changes

To understand how a user can Add the GroupName to MasContract File, kindly refer the below given steps. Navigate to the folder where your MasContract file is located. For reference purpose we have share the path: C:\Sage\Sage 100 Standard\MAS90\SData

Note: Before performing any changes to MasContract file always remember to take backup of the Original file.

MasContract Path
MasContract Path

Now to add resource for SalesOrder user needs to:

  1. Find for “SO_SalesOrderHistoryHeader” in the MasContract file.
  2. Once you have found the Entity under <xs:all> paste the below node and save the file:
<xs:element name="SO_SalesOrderHistoryDetail" type="SO_SalesOrderHistoryDetail--list" minOccurs="0" sme:relationship="child" sme:isCollection="true" sme:label="SO_SalesOrderHistoryDetail" sme:canGet="true" sme:canPost="true" sme:selector="where=SalesOrderNo eq ':SalesOrderNo'"/>
SalesOrder Node
SalesOrder Node

Most importantly, after adding the resources remember to re-start the IIS Services in IIS Manager. Whenever the user makes changes to the MasContract file it is mandatory to re-start the IIS Services.

IIS Manager
IIS Manager

Salesforce Side Configuration & Changes

Now to check whether the added resource is available for use. We need to login into Salesforce and navigate to Entity Settings located under GUMU™ Settings application. Click on Entity Settings Module, upon clicking the below page will appear where list of all entities will be displayed. You have to make changes for OrderLine Entity as marked in the below picture.

Entity Setting
Entity Setting

Clicking on edit button located under the Action pane of Order Line, check whether the resource is available for importing data. To check the changes click on ‘Refresh fields’ button.

Refresh Entity
Refresh Entity

Firstly click refresh button, click on the dropdown arrow present in the “GroupName” field. Secondly, select value “SO_SalesOrderHistoryDetail and again click on Refresh button for the tables to collide. Once refreshed click on the Details tab and under Fields sets refer ERP Source fields tab to view that the tables are now merged along with the fields available for synching history records and click on save.

GroupName and ERP Source fields
GroupName and ERP Source fields

We hope this blog helps you update the Sage SData MasContract file for using the custom data to be used in an outside source. In case you still have queries or concerns, please contact us at salesforce@greytrix.com.

About Us
Greytrix – a globally recognized and one of the oldest Sage Development Partner and a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners and Sage PSG across the globe. We offer Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that require apex code incorporation into the Salesforce platform.

Greytrix has some unique solutions for Cloud CRM such as Salesforce Sage integration for Sage X3Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data MigrationIntegrated App developmentCustom App development and Technical Support business partners and end users.
Salesforce Cloud CRM integration offered by Greytrix works with Lightning web components and supports standard opportunity workflow. Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star rated app listed on Salesforce AppExchange.

The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

For more information on our Salesforce products and services, contact us at salesforce@greytrix.com. We will be glad to assist you.

Related Posts