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.


No comments:

Post a Comment