Monday, May 13, 2019

Vendor invoice add Requester to the hierarchy workflow in D365FO

I had a request for a development where there was a need to have a hierarchical workflow approval process in Vendor invoice. The issue was the requestor was not available in the workflow setup. To fix this I had the done the below changes.


 Create an extension for table VendInvoiceInfoTable and add new field Originator in table VendInvoiceInfoTable.




 Make sure the EDT for this new field is PurchReqRequesterRefRecId



 Extend query VendInvoiceDocument and add the new field created in table VendInvoiceInfoTable  to this query


Add the field in the form VendEditInvoice


In workflow configuration, you will find requestor, now when invoicing the PO just enter the requester user Id.