Category Archives: D365 Business Central
Integrating Microsoft Dynamics CRM with Microsoft Dynamics NAV
Introduction: Microsoft Dynamics CRM entities can be integrated with Microsoft Dynamics NAV out-of-the-box using the default integration setup which is available in Microsoft Dynamics NAV. The Default integration setup has to be enabled to perform integration. This enables users to integrate and synchronize data in Microsoft Dynamics CRM entities such as accounts, contacts, products, user, transaction currency, Sales Order and unit group with equivalent record types in Microsoft Dynamics NAV such as customers, contacts, items, Salesperson, Currency, Sales Order and Unit of measure, respectively. Pre-requisite: Microsoft Dynamics CRM Microsoft Dynamics NAV Purpose: In this article, steps to perform integration between Microsoft Dynamics CRM and Microsoft Dynamics NAV will be provided using the default integration setup. Steps: To perform Integration between Microsoft Dynamics CRM and Microsoft Dynamics NAV, Coupling equivalent records types is the first step which has to be setup initially. Microsoft Dynamics CRM records can be coupled with Microsoft Dynamics NAV records – essentially linking the records together. Once coupled, you can access Microsoft Dynamics CRM records from Microsoft Dynamics NAV and, for some entities, access Microsoft Dynamics NAV records from Microsoft Dynamics CRM. Import the solution in Microsoft Dynamics CRM of Microsoft Dynamics NAV integration which is present in the NAV DVD. Fig 1: Microsoft Dynamics NAV integration solution imported in CRM Enter the Dynamics NAV URL in ‘New Dynamics NAV connection’ present in CRM. Fig 2: New Dynamics NAV connection in CRM Now in Dynamics NAV navigate to Microsoft Dynamics CRM Connection Setup. Enter the Dynamics NAV URL and other credentails to enable Dynamics CRM Integration. Enable integration by checking the Enabled checkbox. Fig 3: Microsoft Dynamics CRM Connection Setup in NAV. Enter the Dynamics NAV Web Client URL. Enable Sales order Integration Fig 4: Enable Microsoft Dynamics CRM Sales order integration Fig 5: Pre-requisites to enable CRM-NAV integration Now under actions tab, click on ‘Use Default Synchronization setup’ and ‘Synchronize modified records’. Synchronization copies data between Microsoft Dynamics CRM entities and Microsoft Dynamics NAV record types (tables). Hence, Microsoft Dynamics CRM and Microsoft Dynamics NAV Integration is now enabled. A coupling provides the basis for integrating records in Microsoft Dynamics CRM with records in Microsoft Dynamics NAV. Essentially a coupling associates or links a Microsoft Dynamics CRM record to a Microsoft Dynamics NAV record. Hence, coupling has to be setup for integration. If you want to synchronize data in the account in Microsoft Dynamics CRM and the customer in Microsoft Dynamics NAV, set the Synchronize After Couplingfield to one of the following options: Yes – Use the Dynamics NAV Data Copies the data from mapped fields of the customer in Microsoft Dynamics NAV to the account in Microsoft Dynamics CRM. Yes – Use the Dynamics CRM Data Copies the data from mapped fields of the account in Microsoft Dynamics CRM to the customer in Microsoft Dynamics NAV. Couple CRM users to NAV Salespeople. Navigate to Salespeople in Microsoft Dynamics NAV. Fig 6: Couple CRM users to NAV salespeople. NAV Salesperson Bart Duncan is coupled with CRM user Tina Menezes Couple CRM accounts to NAV customers. Note: Before coupling NAV customer and CRM account, the salesperson code of the customer must be coupled to a Dynamics CRM user. Fig 7: NAV customer ‘Selangorian Ltd.’ is coupled with CRM account ‘Adventure Works’. Once coupled, Opportunities, Quotes and Cases of the CRM account appear beside the coupled NAV customer as shown below. Also, in CRM for the corresponding coupled account, NAV account statistics will be visible which shows the NAV customer to which this CRM account is coupled. Couple CRM Units Groups to NAV Unit of Measures. Navigate to NAV Unit of Measures. Setup coupling with CRM unit group. Fig 8: Unit of measure in NAV Fig 9: NAV Unit of measure ‘PCS’ is coupled with CRM Unit Group ‘NAV PCS’ Couple Dynamics NAV currency with Dynamics CRM transaction Currency. Fig 10: Dynamics NAV Currency ‘USD’ is coupled with Dynamics CRM Transaction Currency ‘USD’ Couple CRM products to NAV items. Fig 11: Dynamics NAV Item ‘1001’ is coupled with Dynamics CRM product ’12 inch Security Monitor’ Sales Order Integration When sales order is just created, it does not appear in Navision. As the sales order is submitted it appears in Navision. After a sales order is created in Microsoft Dynamics NAV, you can modify the sales order in Microsoft Dynamics NAV. Fig 12: Sales order ‘Test order’ created in CRM – Status changed to submitted After submitting sales order, in the search box of NAV enter Sales Orders, and then choose the related link. In the Sales Orders window, on the Navigate tab, in the Dynamics CRM group, choose Sales Order List. The Microsoft Dynamics CRM Sales Orders windows opens to display a list of only sales orders in Microsoft Dynamics CRM that have the Submitted status. Fig 13: Submitted sales order from CRM appears in NAV When you post a sales order in Microsoft Dynamics NAV, the status of the coupled sales order in Microsoft Dynamics CRM changes from Submitted to Invoiced. Conclusion: Integration between Microsoft Dynamics CRM and Microsoft Dynamics NAV provides the following capabilities: Enables users to work in both Microsoft Dynamics CRM and Microsoft Dynamics NAV. Users can view data for equivalent records, such as Microsoft Dynamics NAV customers and Microsoft Dynamics CRM accounts from either system. Data can be shared and synchronized between Microsoft Dynamics CRM and Microsoft Dynamics NAV. This enables users to keep information up-to-date in both applications.
Share Story :
Steps to create Table Extension Object and Page Extension Object Using Visual Studio Code in NAV
Introduction: Table Extension and Page Extension are two new objects introduced in the Microsoft Dynamics NAV TENERIFE Developer Preview (Visual Studio Code) release. Table Extension allows to add more fields to an existing table and to change properties of certain fields of a table. Page Extension object allows to add additional fields and actions to an existing page and extends Dynamics NAV page object. This article will provide the basic steps to create a Table extension object and Page extension object using Visual Studio Code in NAV. Prerequisite: 1. Visual Studio Code 2. Microsoft Dynamics NAV TENERIFE (Developer Preview) Purpose: To create a table extension object and page extension object using Visual Studio Code in NAV. To demonstrate this, I will be adding an additional field on Item card. Steps: Create a new folder for a new project. Fig 1: New Folder created for the Project Open this folder in Visual Studio Code Create a new file within this folder in Visual Studio Code Fig 2: Create a new file in the newly created folder Let’s name this file ‘ItemTableExt.al’ Typing the shortcut ‘ttableext’ will create the basic layout for a table extension. Fig 3: Shortcut ttableext Fig 4: Basic layout of a table extension Replace ‘id’ with a unique table id. It should be in the range from ‘70000000’ to ‘74999999’. Replace ‘MyExtension’ with a unique name of the table extension and ‘MyTargetTable’ with the name of the table where these additional fields have to be added. This is shown in the below Screenshot. After entering the ‘MyTargetTable’ name, Press ‘Ctrl+Shift+B’ to build the solution which will create app.json file. Here, I will be creating a Decimal Field ‘Control Sample Qty’. To create a table field, type the shortcut ‘tfield’. Fig 5: Basic layout of a table field Replace ‘id’ with a unique field id. Replace ‘MyField’ with a unique field name and mention the type of the field viz. Decimal, Integer, etc. Mention the properties of the field below. Fig 6: New field ‘Control Sample Qty’ with ID ‘70000000’ of type ‘Decimal’ is added to ‘Item table’ which is highlighted in red colour. Property of this field i.e. ‘Editable=False’ is highlighted in lime colour. Hence the table extension has been created. To create a page extension, create a new file. Let’s name this file as ItemPageExt.al. Type the shortcut ‘tpageext’ to create a basic layout of a page extension. Fig 7: Basic layout of a page extension. In the layout section, you can use the following functions to place page fields and groups on the page. Similarly, in the actions section, you use these functions to place actions in the ribbon. (Note: General and AddressDetails are group names) addfirst(General) – Applies to Groups only addlast(General) – Applies to Groups only addafter(AddressDetails) – Applies to Fields and groups addbefore(AddressDetails) – Applies to Fields and groups movefirst(General) – Applies to Groups only movelast(General) – Applies to Groups only moveafter(AddressDetails) – Applies to Fields and groups movebefore(AddressDetails) – Applies to Fields and groups Replace id with a unique page extension id in the range from ‘70000000’ to ‘74999999’. Replace ‘MyExtension’ with the name of the page extension. Replace ‘MyTargetPage’ with the name of the existing page in which additional functionality has to be added. The following page extension extends Item card and adds field ‘Control Sample Qty’ to the ‘InventoryGrp’. Fig 8: Field is added to the page using Page extension Hence, page extension is created. Build the solution using ‘Ctrl+Shift+B’. Hence ‘navx file’ will be created. Press F5 to create launch.json file or manually create launch.json file. Thus launch.json will be created. Fig: launch.json In the NAV Web client, in Extensions Management, the published extension will be displayed. Fig 9: Extensions Management Thus, the newly created field i.e. ‘Control Sample Qty’ will be displayed in Item card. Fig 10: New field ‘Control Sample Qty’ field has been added to Item card. Conclusion: Thus, Table extension is used when additional fields are to be added to an existing table or any properties of the fields have to be changed and Page extension is used to add additional functionality to existing pages like extra fields and actions.
Share Story :
‘Item Classification’ in NAV using Visual Studio Code (VS Code)
In this article, we create an extension of standard Page ‘Item Card’ in NAV using Visual studio code (VS Code). To implement the extension, I have created a field ‘Item Classification’ whose Data type is an Option in the table extension in Visual Studio Code. We use app.json (Cltl+shift+B) to build and create a .navx package and launch.json(F5) to publish the extension on the NAV Web Client. Business Requirement Item classification field classifies the raw materials whether it is an Active Pharmaceutical Ingredient(API), Excipient, Pallet, Capsules, Finished Good and Ingredient. This is used by the Production Department to issue Raw Materials from the Warehouse. They classify the items they need by using the Item classification field. Prerequisites: 1. Visual Studio Code 2. Microsoft Dynamics Web Client. Steps: We Create a folder named ‘Item Extension’ in which we place all are codes. Open the visual studio code, click on Explorer and then click on ‘Open folder’. Click on new file and rename it with a name with extension .al e.g ItemTabExt.al Now we create a table extension of standard table ‘Item’. Typing the shortcut ‘ttableext’ creates a basic layout for the table extension object. We provide an id and extends the table name in this case it is the Item The table id range is from 70000000 to 74999999. While saving, it throws error like ‘The target page Item for the extension is not found’ for this we need to create the app.son file by building the solution (Cltl+Shift+B). app.json is automictically created with a 16 byte binary data type which is a GUID. Enter the extension name and publisher for the same. Below is the app.json file The package Cache path is the path to the folder where referenced symbol package files are located. The path could be absolute or relative to the current extension working directory. Now here the package is created Chris_Item extension_1.0.0.0.navx This removed the error on extension table name. Typing the shortcut ‘tfield’ creates the basic layout for the fields. Enter the field id, name and data type in this case the field name is ‘Item Classification’ and data type is ‘Option’. We enter the Caption and the Option string for it. To create the page extension, we type the shortcut tpageext which will create the basic layout for page object using AL extension in Visual Studio code. Edit the id and name and extends Page Name in this case it is ‘Item Card’. We use the function name addlast(Group Name) to add the field at the last of the Group Name Specified.typing the ‘tfieldpage’ automatically creates the layout, we edit MyField and write the field name , edit the source and write the Caption for it. Publishing the extension(F5) will generate the launch.json file Open the Web client and in the search bar type ‘Extension Management’. Click on the installed app. It gives you the details of the Extension name,version and Publisher name. Browse to the Item Page, the field ‘Item classification’ is added. Conclusion: We created table and Page extensions using visual Studio for Standard Table 27 Item and Page 30 Item Card.
Share Story :
Create item from description NAV 2017
New parameter “Create Item from Description” has been added in Sales and Receivable setup in NAV 2017. By enabling this option user can create new item by adding description on Sales Quote lines, Sales Order lines or Sales Invoice lines. 1) Go into Sales and Receivable Setup and enable Create Item from Description field. 2) When user enter description in Sales quote lines, sales order lines or sales invoice lines for item which is not exist then system will give pop up to create new item or select an existing item. Create new item from Sales Quote line. Create new item from Sales Order line Create new item from Sales Invoice line. 3) When you select Create new item card, System will open template for new item. Select template and click on OK. 4) New Item will create based on item template. User can specify other fields which are require. Conclusion: By using this feature user can create new item by using description and use it for transactions.
Share Story :
AL language code sample in Visual Studio for developing extensions for Dynamics NAV
Microsoft has released AL language code samples for developing extensions for Dynamics NAV. This AL sample code is available to download from the following link: https://github.com/Microsoft/AL. Microsoft wants to move all development very soon to Visual Studio using AL code for Dynamics NAV and Dynamics 365 Financials. Hence, programming for developing extensions for Dynamics NAV and Dynamics 365 have to be done in Visual Studio in the future. This article explains about the AL sample code for developing extensions for Dynamics NAV in Visual Studio. Prerequisite: Visual Studio Purpose: To understand AL language code sample for developing extensions for Dynamics NAV in Visual Studio. Explanation: The new version of extensions will be called ‘Extensions 2.0’ which is not based on the Delta file design. With Extensions 2.0, developers need to code and write new objects that describe additional capabilities required in the system. ‘Table Extension’ and ‘Page Extension’ objects will be used to describe new fields and UI elements and ‘in-client page designer’ will be used to make those changes in a WYSIWIG way-all of which are stored as extensions under the cover. This is referred from the following link: https://blogs.msdn.microsoft.com/nav/2016/12/13/more-information-about-the-developer-preview-for-dynamics-nav/ In the AL sample code released by Microsoft, there are three .al files i.e. HelloWorld.al, GreetingsManagement.al and CustomerCardExtension.al and two .json files i.e. launch.json and app.json. CustomerCardExtension.al and HelloWorld.al are adding an action on Customer Card page. CustomerCardExtension.al is a ‘pageextension’ object type. The RunObject property of CustomerCardExtension.al calls HelloWorld.al which is a codeunit object. Fig. 1: CustomerCardExtension.al calls the Codeunit HelloWorld.al The keyword extends tells the compiler that this object is extending an existing object that is named after. On clicking this new action which is created on Customer Card page, Codeunit GreetingsManagement.al runs and generates a greeting message. GreetingsManagement.al is a codeunit for creating random greetings. Fig. 2: Codeunit GreetingsManagment.al While creating extensions in the previous way, manifest file has to be generated using Windows PowerShell ISE which is done after creating delta files. But while using AL code for developing extensions for Dynamics NAV in Visual Studio, ‘app.json’ file is required. ‘app.json’ is a manifest file that defines how your code should be built and bootstrapped into a live application. It enables developers to define their applications’ details, setup configurations and runtime environments in a structured way. Fig. 3: app.json To debug your app in VS Code, it is needed to set up launch configuration file which is ‘launch.json’. Fig. 4: launch.json Conclusion: The Visual Studio Code editor will become the preferred way of doing modifications in the future and all extensions for Dynamics NAV will be done in Visual Studio. Microsoft has mentioned that in the future, they will be adding support for XML Ports, Queries and Reports in Visual Studio Code.
Share Story :
Error Resolution on Publishing Extension after new Release CU1 of NAV 2017
This article is about the issue faced while publishing an extension in NAV 2017 which was resolved after the new CU 1 release of NAV 2017. Pre-requisites Microsoft Dynamics NAV 2017 Windows PowerShell ISE/ Issue faced in previous version 10.0.12762 of NAV 2017 In our extension, we had created a function which runs a report. The property ‘ProcessingOnly’ of the report was set to yes. This property when set to ‘yes’ deletes the report layout. While publishing the extension using Windows PowerShell, I encountered an error “Cannot find Report Directory”. Issue Resolution after CU 1 release of NAV 2017 version 10.0.14199 I referenced blog written by ‘Amol Salvi’ which describes Cumulative Update Released summary. I installed the cumulative update 01 (CU 1) for Microsoft Dynamics NAV 2017 (Build 14199) and published my extension using Windows PowerShell which was successfully published.
Share Story :
Packing Requisition Functionality in NAV 2017 using Extension
Introduction We implemented Packing Requisition functionality for one of our Pharma Client in NAV 2016. The same functionality is replicated in NAV 2017 using Extension. Client Requirement The client process is such that once the goods are produced it needs to be packed as per the instructions given by the customer. These packing details needs to be send to customer and to other parties like Shipping Agency and Customs Department. The packing details needs to be stored in the system for reference as well as for preparing some shipment documentation. The details are also useful to identify the batch number and expiry date of goods packed in particular shipper along with the gross weight and net weight. Pre-requisites: Microsodt Dynamics NAV 2017 Windows Powershell ISE Purpose In NAV, after a Sales order is created there is no provision to enter packing related details . Once the goods are produced it is directly shipped. Thus to fulfill the client’s requirement we developed the Packing List Functionality. Customization in NAV 2016 In NAV 2016 we can directly customize standard objects and can alter the source code. Customization in NAV 2017 with Extension. In NAV 2017 using Extension, we extend NAV without altering the standard source code. Extensions can be installed or uninstalled, giving customers compelte control over the additional functionality that they need. All coding with respect to adding of fields in NAV 2017 using extensions is done using the Codeunit object. In the Codeunit object, we create functions to trigger on insertion, modification,validation of that particular field. In the properties of the function,we subscribe to the system Event and specify the Event Publisher Object. The Event Function ‘OnAfterValidateEvent’ is selected from the lookup and the Event Publisher Element is selected. Steps We create Packing page which should have Sales order number, customer details and shipping information. The Packing sub form is then created having details like product type, description ,total quantity.Packing Case details Page which would be the sub page of Packing Sub form having details like number of cases, the gross and net weight, batch number, manufacturing and expiry date. The following are the steps to implement the packing functionality in NAV using extensions. We create folder as below and all original objects to be modified are first exported in the .txt format in the Original object folder. The below modified objects for the extension packing requision functionality are exported in .txt format in the Modified Folder. A menu suite is created which consist of the link to the packing list page in the Order Processing Department. Now we import all the unmodified objects and all the newly created objects are deleted. We then run Windows PowerShell ISE as Administrator, create delta file by using ‘Compare-NAVApplicationObject’ commandwhich consist of only the modified objects. We Specify the paths of the folders and run the command. The manifest file is created using ‘New-NAVAppManifest’ command which consist of the publisher name, version number and extension name in a .xml format. The navx package is created using the ‘New-NAVAppPackage’ command in .navx format The .navx package is published using the ‘Publish-NAVApp’ command The app is installed using ‘Install-NAVApp’ command. Test the extension by running RTC In Sales and Marketing select sales and receivable setup, and enter the package No. series. The Customer No. is selected from the lookup and the customer details are auto populated. We enter the product details in the sub form. The No. In the packing is sub form is selected using the lookup and the related fields of the product are auto populated. Clicking on Line of the Packing sub form we enter the packing case details. Conclusion. In NAV 2017 using Extension, we extend NAV without altering the standard source code. Extensions can be installed or uninstalled, giving customers complete control over the additional functionality. A packing list functionality provides information about the the sales order, customer,shipment information and Shipper’s details of the product.
Share Story :
User security in Navision 2017
Introduction: In Navision, user security can be achieved by assigning different permission sets to users. Permissions can be assigned to users according to their role. A collection of database permissions for one or more objects in the Microsoft Dynamics NAV database that you can assign to one or more users is known as a Permission Set. In this article, we will be creating a user who will have access to Items, Customers and Sales Orders only. Everything else present in the UI will be hidden from this user. Prerequisite: Microsoft Dynamics Navision 2017 Purpose of the setup: Our goal is to create a user with limited permissions. This user will have access to only Items, Customers and Sales information. Steps: Create new permission sets which includes access to only those objects i.e. tables, pages, reports, codeunits, etc. which the user has access to. A new user is created. The newly created permission sets are then assigned to this user. This will ensure that the user does not have permissions to access any other tables, pages, reports or any other objects which are not mentioned in the above newly created permission sets. Now these UI elements which the user does not have access to should not be visible to the user. Microsoft Dynamics NAV can be configured to show and hide user interface (UI) elements based on the license or the user’s permissions to the underlying tables. All elements, fields, actions, and page parts, can be removed from the user’s view of Microsoft Dynamics NAV. Depending on the setting in theUI Elements Removal field in the Microsoft Dynamics NAV Server Administration tool, only UI elements on objects in the license or on objects that the user has permissions to will appear in the user interface. LicenseFileAndUserPermissions should be selected for the UI Elements Removal field in the NAV Server Instance. This ensures that a UI element is removed if the related object is not included in the license file and the user does not have permissions to the object as defined in the AccessByPermission property for the related UI element. To make full use of theLicenseFileAndUserPermissions option in the UI Elements Removal field, it is recommended that you assign the special permission set, FOUNDATION, along with the relevant permission sets that define which application objects the user will access. AccessByPermissionproperty can be used to remove the element which should not be visible to the user. This Property Applies to Fields in tables (affecting all related fields on pages), Fields on pages, Actions on pages, MenuSuite items, Page parts, such as a Lines FastTab. To remove a UI element ‘Permission set’ from the visibility of the above created sales user, go to the MenuSuite. Navigate to the ‘Permission Sets’ under General section of Administration in the MenuSuite. Go to the properties of ‘Permission Sets’ Select the ‘Access By Permissions’ property. Choose the AssistEdit button in the Value field. The fields which are required to be selected are: Object Type – Specify the type of object to which permission is required for the UI element to be visible. Object ID – Specify the object to which permission is required for the UI element to be visible. Read – Specify if Read permission is required for the UI element to be visible. Insert – Specify if Insert permission is required for the UI element to be visible. Modify – Specify if Modify permission is required for the UI element to be visible. Delete – Specify if Delete permission is required for the UI element to be visible. Execute – Specify if Execute permission is required for the UI element to be visible. Hence, ‘Permission Sets’ will be visible to the user in the front end only if he has access to read the Permission Set table. In this scenario, Permission sets will not be visible to the user. Conclusion: Thus, using UI elements removal feature and Access By Permissions property, UI elements can be hidden from the user’s visibility. Different permission sets can be created for different users with limited permissions.
Share Story :
Dashboard Customization For NAV 2017
Introduction In this article, we customized our dashboard by creating a new Role Centre consisting of Sales Cue, Purchase Cue and Production Cue, business chart and including list of items. A Cue is a tile on a page in the Microsoft Dynamics NAV client that provides a visual representation of aggregated business data. Cues are designed to give users with a quick status of their daily activities, which acts as a prompt them to take action. We typically add Cues on Role Centre pages so that they are readily available to users. Prerequisites Microsoft Dynamics NAV 2017 with a developer license. The Role Centre consist of the following: Table 36, Sales Header, Table 38 Production Header Page 9301, Sales Invoice List, Page 9305 Sales Order List, Page 9307 Purchase Order List Role Centre Page Purpose of the Setup The purpose of this setup is to customize the front end of NAV 2017 by getting the sales, purchase and production Cue placed on one role centre. Steps Create a table with sales, purchase and production fields with data type as integers Set the Fieldclass property to Flowfields and give the CalcFormula and Select Editable field to No. Repeat the same procedures for other fields. Create a CardPart Page and select group to CueGroup A Cue is a tile on a page in the Microsoft Dynamics NAV client that provides a visual representation of aggregated business data, such as the number of open sales invoices or the total sales for the month. Add CueSetup Codeunit in the Global Variables and also create an Action item for the same. Create a Page with Role Center Area as container Container and add the cuepage created, business charts, list of customers, items etc. Create Action Containers for reports and the home items and run the page. Select the setup Cues option and customize the threshold and the range. Color is assigned to various ranges Standard -None (uses the background color of cue) Favorable – Green Unfavourable – Red Ambiguous – Yellow Subordinate – Grey Conclusion The Sales, Purchase and Production Cues designed give the users a quick status of their daily activities, which acts as a prompt them to take action.
Share Story :
Email on Releasing and Posting of Purchase Order, Sales Order and Journal
Introduction In this article we send emails on releasing and posting of purchase order, sales order and journal. We send emails with attachments in .pdf format to the respective users. For Purchase order the email is sent to the respective Vendor regarding the successful posting of orders. For Sales order email with attachment is sent to customers and in General journal the email is sent to the users. Prerequisites Microsoft Dynamics NAV 2017 with a developer license. Page 42 Sales orders, page 50 Purchase order, Page 39 General Journal Codeunits 400 for SMTP Mail setup, codeunit 419 File management Table 409 For SMTP Mail, Table 91 user setup. Purpose of the Setup The purpose of this setup is to send emails with attachments on releasing and posting of purchase and sales order and on Posting of General journal in NAV 2017. Steps Configure the SMTP mail setup. Enter the sender’s email id in the USERID and password of the sender in the password field. The authentication is basic. Enter the appropriate SMTP server and port number. Write a codeunit for sending email with attachment Here SendEmailWithAttachment is a function in the codeunit. This codeunit Fetches the Customer email address. Using SMTP Mail it attaches the attachment in .pdf format and then sends the email. In the Respective Page, Call the codeunit in the Post and Release action button using the following command. In the NAV front end create a new sales order and post it. This send the email to the respective customer. The same procedure is applied for Purchase order and General Journal. Conclusion The Email automatically is send to the customer, vendor or user with the attachment on Posting and on release action.
