To display Business Justification field from PurchReqBusJustification Table


I am trying to display the Business Justfication field of PurchReqBusJustification Table into the Receipt List report of Purchase Order. But the problem is that the PurchReqBusJustification table has no coresponding unique field into the purchase order table. The only available fields are RefTableId, RefRecId, and Business justification.

Can anybody give me an idea on how I can call this Business Justification field to be display in the Purchase Receipt report?

Thank You,

Ronnel :slight_smile:

The business justification will be there for header and lines for a purchase requisition. Use this code

static void businessJustification(Args _args)/// this for purchReqLine - if the busJustification is selected in Lines


VendReceiptsListTrans vendReceiptsListTrans;

PurchLine purchLine;

PurchReqLine purchReqLine;

PurchReqBusinessJustification purchReqBusinessJustification;


select LineNum,PurchReqId from purchLine where purchLine.InventTransId == vendReceiptsListTrans.InventTransId;

purchReqLine = PurchReqLine::find(purchLine.PurchReqId,purchLine.LineNum);

purchReqBusinessJustification = PurchReqBusJustification::find(purchReqLine.TableId,purchReqLine.RecId).BusinessJustification;


Note: Try to Verify the post if it solves your problem.

Hi Kranthi,

Should I code it in the report method and call that method (businessJustification) in order to be displayed in the Report_PurchReceiptsList?

Thank you in advance Kranthi. :slight_smile:

Put the above code in a display method.

Kranthi I did it with the help of your codes, Your amazing, Thank you againg kranthi.

Best wishes for you.:slight_smile:

Hi ronnel, can you verify the solution.