≡ Menu




Relation between PurchLine and PurchReqline Tables in Dynamics AX 2012 R3.

In one of SSRS Report requirement, client wants to see Purchase order quantity, Invoice Quantity against items purchase requisition Quantity.

 

Instead of writing a query on ItemId and InventdimId, I found out of the box function In PurchReqLine table. This method return the reference of Purchline. With reference of Purchline, I can get Purchase order Number and get Item Invoiced quantity.

 

PurchLine       purchLine;

PurchReqLine reqline;

 

_purchLine = reqline.purchLine();

 

 

The relationship between Purchline and PurchReqline is RecId, Purchline contains the Reference RecId of PurchReqline.

 

PurchLine       purchLine;

 

if (this.PurchId && this.LineRefId)

{

select firstonly purchLine

where purchLine.PurchId           == this.PurchId    &&

purchLine.PurchReqLineRefId == this.LineRefId  &&

!purchLine.IsDeleted;

}

{ 0 comments… add one }

Leave a Comment