Linking purchase orders with sales order using x++

When importing data from another system, especially a data migration, you might want to build links between purchase orders and sales order. This can be done by updating the following points of the system:

The table InterCompanyPurchSalesReference needs to contain a record that points the purchase order to the appropriate sales order. This table only has two fields, salesid and purchid.

The second step you need to complete is to populate three fields on the purchase line and sales line to complete the link. On the purchase line the fields are:

ItemRefType    this is an enum and should have the value InventRefType::sales

InventRefId     This is the salesid

InventRefTransId    This is the inventtransid from the sales line that the purchase order line is linked against.

On the sales line the fields are:

InventRefType    this is an enum and should have the value InventRefType::purch

InventRefId     This is the purchid

InventRefTransId    This is the inventtransid from the purchase line that the sales order line is linked against.

Once all the above have been setup you will find the links between the purchase order ans sales order are complete, and the marking between the inventory transaction are present.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s