Friday, April 21, 2017
Thursday, April 21, 2016
- Approval, approval leaves a work task, item or document in an blocked or unapproved state until approved by a suitable person in your organization
- Notification, notifications tell users that something has happened and/or that they need to take some kind of action
- Process automation, process automation means executing a process routine and have the Dynamics NAV system calculate something or perform an action
- When a new customer is created, email the sales person responsible for that region to alert them to the new customer
- When a purchase invoice exceeds $250, email the financial controller to alert them
- When a Purchase Invoice exceeds $250, put the purchase invoice on hold until it is approved by a manager.
- When new customers are created, block them until they have had a credit check performed.
- Once a purchase document has been approved by the accounting manager, automatically post it to the Dynamics NAV system.
Events and Workflow Events
- Open the Microsoft Dynamics NAV 2016 Development Environment.
- On the Tools menu, choose Object Designer.
- From Object Designer, create a new codeunit.
- Create a method called OnDeleteOrderCode. And Give the method a return value of Code, length 128.
- And write the code: EXIT(UPPERCASE('OnDeleteOrder'));
- Create the event itself. This will be an empty method tied to the "Sales Header" table.
- To do so, make another global method, called OnDeleteOrder.
- Open the property window for the method (view->properties) and set the Event property to Susbscriber, EventPublisherObject to Table Sales Header and EventFunction to OnAfterDeleteEvent.
- From the editor, define a local variable for the OnDeleteOrder function.
- In locals, create a variable called WorkflowManagment, subtype codeunit ‘Workflow Management’
- Add the code
- Create another event that will be a subscriber to the Add Events to Workflow Library event.
- To do so, make another global method, called AddEventToLibrary.
- Open the property window for the method (view->properties) and set the Event property to Susbscriber, EventPublisherObject to Codeunit ‘Workflow Event Handling” and EventFunction to OnAddEventsToLibrary.
- Create a text constant to hold the user readable string which describes the workflow event. Select view->Globals->text constants and add a new value OnDeleteTxt and set the value to ‘when a sales order is deleted’.
- Next, define a local variable in the AddEventToLibrary function for calling the WorkflowEventHandling codeunit.
- In locals, define variable WorkflowEventHandling as a codeunit of subtype ‘Workflow Event Handling’.
- Finally add the code which calls that method.
- Now Add one Method “RunSendEmailResponseCode” And set the return Type Code And Length 128.
- Add Code:
- Add Another method AddResponseToLibrary.
- Add another method EsecuteResponse
- See the bellow screenshot for details of these two methods property & Code
- Add another method for sending email to sales header
- See the bellow screenshot for mail sending code.
Myself Today Web Designer, and Microsoft Dynamics NAV Programmer in ICS Technology Services Pvt Ltd. Hyderabad. Started with C++, ORACLE, VB, Java and today well-versed with top Microsoft Technologies ASP.NET,C#.NET also VB.NET, SQL SERVER. Interested to implement always new and wanted technologies. Has own Development Team for some project. Love to hear comments from u for my posts.When you live for a strong purpose, then hard work isn’t an option. It’s a necessity/compulsory – please understand it and work hard and be sincere
Hi all, Today i came across a different type of query,where Some customers may not want to use Departments menu available. We need to h...
Walkthrough: Implementing New Workflow Events and Responses Introduction Microsoft Dynamics NAV 2016 Workflows enable you to model rea...
New Workflows added in NAV 2017 Hi All, Today i came with amazing article in NAV 2017. First of all, I would like to say t...
DATA MIGRATION IN NAV 2016 FROM NAV 2009 Hi all, Today i came across with different type of requirement, Sometimes we need to move/Cop...
Hi, All Today one of my client wants to Export the data from NAV to MS Word, for that i prepared documentation, you can also use, its work...
Add a QR Code to a Dynamics NAV 2015/2016 in Report Header Hi All, This article will demonstrate how to add a QR Code to a NAV 2016. ...
Hi All, Today I'm going to describe how you can do the bellow requirements using NAV 2016. 1. Open Outlook Application. 2. Att...
Item Unit Price Change Approval Workflow in NAV 2017 Hi All, Today, I came with amazing article in NAV 2017 i.e. Setup workflow ...
FILTER OBJECT ID’s 👋 Hi all, Today i came across with different type of requirement, Sometimes you might be need to filter ob...
EXPORT DATA FROM SQL SERVER 2014 WIZARD Hi all, Today i came across with different type of requirement, Sometimes we need to move/C...