Wednesday, January 26, 2022

Modify expiry and delivery date in RFQ created via Purchase requisition : D365 Finance and Operations

The feature of processing requests for quotations in Dynamics 365 Finance and Operations enables visibility to the quoting process, traceability, and better collaboration among buyers and suppliers(vendors) but it becomes complex for certain new users. 

It is recommended to go through this blog which is also a sort of a training guide for new users. 

Today I would like to share with you a business requirement along with the solution while creating a request for quotation via purchase requisition.

Create the request for quotation from purchase requisition.

While creating a purchase requisition, it is mandatory to setup the workflow "Purchase requisition review"

Navigate to Procurement and sourcing -> Procurement and sourcing workflows.

You can have an overview of the workflow here in this blog. Workflows can be configured on both purchase requisition header and lines. Once the purchase requisition workflow is configured now it is time to create a purchase requisition and submit to workflow. 

Navigate to Procurement and sourcing -> All purchase requisition


Click the "New" Button and add required purchase requisition lines and initiate the workflow process by clicking submit. 

Now you will be able to see "Create request for quotation" button enabled to create the RFQ from purchase requisition. Click this button and now you can see the request for quotation created from purchase requisition.

Navigate to Procurement and sourcing -> Request for Quotations -> All request for quotations

Business Requirement:

Now as per the business requirement, it was required to add the days offset in expiration and delivery dates of request for quotation so that while creating request for quotations from purchase requisition, the days offset is added automatically.

Solution: 

In order to meet the first requirement of adding the offset in expiration date, you can do in "Procurement and sourcing parameters" by adding the days offset.

Navigate to Procurement and sourcing -> Setup -> Procurement and sourcing parameters

And once you define the days offset in above screen, the expiration date is found added with days offset.

However, it is required to do a little bit of coding to modify the delivery date. 
Create an extension class of "PurchRFQCaseAutoCreate_PurchReq" and override the method "setPurchRFQCaseTable"


 I hope this blog post will help you understand the process of creating request for quotation via purchase requisition. Please keep following my blogs. I appreciate your feedback and comments. Thank you! 

Tuesday, January 18, 2022

Capturing the event handler for validation before posting vendor payment journal: D365 classes

 This is my first blog post in 2022, I would like to share with you related to validation and payment control for payment journals and would share with you peace of code to capture the event handler for validating the payment journals - Just to give you a bit of overview of payment journal. Payment journal consists of method of payment where you can control payments and its basic validations. For instance given below we have method of payment set as "Check".

Going into the detail of this method of payment we can see we can also set the payment control, where few of the basic validations can be configured. for instance if check number is mandatory before posting the payment journal or not.


Also one thing to be noted that in order to add any "check number" to payment journal, check number setup is required and it is mandatory to generate the payments before it is posted. And "Generate payment" button  is disabled if any associated workflow is initiated and payment journal is not approved yet. Once it is approved, you can generate payments.  also you can refer this blog for configuring the workflow for payment journals.


Now let's come to little code to capture the event handler before posting the payment journals. Here you go.


I hope this blog will help you understand, how do we control payments and validations for payment journal. Would like to know about your feedback further.