Intercompany – for custom tables
If you need to create records in custom Tables using standard Intercompany Classes, then you need to make some code changes in order to extend the standard Intercompany functionality. For example if you need to create records in your custom table when an Intercompany Sales order is being created, you need to follow the steps
1. Create a Axd Class for your custom table.
2. Add a field InterCompanyCompanyId in your custom table.This field will store value of company id for Intercompany which is set up under Basic—>Set up –>Application Integration Framework–>Endpoints .
3. Make changes to PurchTableType Class in interCompanyMirror method and add the following code in changecompany block :
4. Now create a Sales order in the company for which Intercompany is set up (Customer account is set up in Constraints for related Intercompany). You should see the record is inserted in your Custom Table now 🙂