cXML Purchase Send – Merge objects overview

The following code changes are made in the merged objects. It’s probably more efficient to add these manually without going through the trouble of trying to merge into you environment and there are only four objects to modify with some minor changes.

VendTable.

There changes to the VendTable are minimal with the addition of a new field. First modify the VendTable. There is a new field here called cXMLOrderEnable which is based on the EDT cXMLOrderEnable which is included in the CXMLPurchaseRequest project. This fields base been added to the PurchaseOrder field group so it will display on the VendTable form and avoid making the need for a form modification.

clip_image001

PurchTable

Second modify the PurchTable to add the same field based on the same data type cXMLOrderEnable. This will be copied from the VendTable in the initFromVendTable method when a purchase order is created.

clip_image002

The code change in the initFromVendTable method is one line of code as seen in the compare. You can add this code at the bottom of the method.

this.cXMLOrderEnable = _vendTable.cXMLOrderEnable;

clip_image003

VendPurchOrderJour

The third change is a new override on the insert method for the VendPurchOrderJour table. This has one line of code as you can see in the compare. This makes a call to a class that is provided in the CXMLPurchaseRequest project.

public void insert()

{

super();

cXMLPurchRequestMaintain::UpdateOrderJour(this);

}

clip_image004

PurchCancel

The fourth change is code to record when a purchase order is cancelled. This is made by an ammendment to the run method on the PurchCancel class.

//Mark request deletion.

cXMLPurchRequestMaintain::MarkforDelete(purchTable.PurchId);

clip_image005

Refer to this post for an overview of the cXML Purchase Order Send.

https://organicax.com/2017/02/08/cxml-purchase-order-request-send-ax2012-r3-v1/

 

Cheers

Lachlan

 


Filed under: Procurement and sourcing
Related
Recommended