Assign default values to form in D365FO
Scenario:
I am assigning a value to a field in HcmEmploymentLeave form using OnInitValue form data source event handler.
Lets start!
- Run Visual Studio
- Search your desired form in Application Explorer
- Right click the form -> click Open designer
- Expand the Data Sources node
- Expand your desired data source node -> Events -> Select OnInitValue event -> Right click and copy event handler method
- Create a new class
- Paste the event handler method
- Add code in it like below:
Above code is just an example to show you how it works. You can apply these steps to any form.
Comments
Post a Comment