Customizing Dynamics NAV
Discover different ways to customize the application to give you and your colleagues access to the features, functionality, and data that you need most.
Dynamics 365 2019 release wave 2 plan Discover the latest updates to Dynamics 365.Release Plan | Weekly Deployment Notes
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants.Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements.
ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
In this article, a workflow response is created in the standard purchase order workflow. This response sends an email to the vendor after release of the purchase order i.e when the send approval request of the purchase order is approved by the authorized approver, the status of the purchase order changes to Released afterwhich an email is sent with attachment in a .pdf format to the vendor.
1.Microsoft Dynamics NAV 2017
1. Configure smtp mail setup in the front end where you need to enter the sender’s email id and password.
2. Now to create a workflow response we need to create a global function in a new codeunit. Navigate to View tab select C/AL Globals or (Ctrl+G). click on the functions tab and under the Name type the function name, by default the function is a local function.
3. To make it a global function, select the function ‘SendEmailCode’ and click on view tab then click on properties. Set the Local to No, this will make the function global.
4. Create another global function with another name in this article I’ve used ‘SendEmail’. Set parameter to the record ‘Purchase Header’ and enable it as a variable.
5. In the below code, we first fetch the vendor email id and set it to a variable VendEmail.
6. Now the response created of sending email to the vendors need to be added to the workflow response library.
7. Now to execute the response we need to create a global function.
8. In the Dynamics NAV front end , navigate to workflows from the search bar. In the purchase order approval workflow, add the response ‘Send Email To Vendor’ then enable the workflow.
9. Navigate to Purchase order from the search bar and click on Send approval request button on the menu bar.
10. The email is sent to the vendor.
The post Send Email with attachment to the vendor as a response in Purchase order workflow in NAV 2017 appeared first on CloudFronts - Microsoft Dynamics 365 | Power BI | Azure.
Business Applications communities