Category Archives: D365 Business Central
Displaying Lookup Form on a field based on a particular selected option of another field in Request page of a Report in Microsoft Dynamics NAV
Introduction: In Microsoft Dynamics NAV, Lookup Form on a field corresponding to a particular selected option of another field can be displayed in the Request page of a report using C/AL code. In this article we are going to see the procedure with the code required to achieve the same. Pre-requisites: Microsoft Dynamics NAV 2017 Procedure: Step 1: Consider the below two fields which are created in the request page of a report i.e. ‘Bal. Account Type’ and ‘Bal. Account No’. Step 2: BalAccountType is a global C/AL variable of type option which has two options in OptionString property i.e. G/L Account and Bank Account. Condition: If G/L Account option is selected in the ‘Bal. Account Type’ field, then G/L Account List i.e. Page 18 should be displayed as a lookup form in the ‘Bal. Account No’ field. If Bank Account option is selected in the ‘Bal. Account Type’ field, then Bank Account List i.e. Page 371 should be displayed as a lookup form in the ‘Bal. Account No’ field. Step 3: Firstly in ‘SelectionFilterManagement’ i.e. Codeunit 46, create a function GetSelectionFilterForBankAccount(). In the above C/AL code, BankAccount is a global C/AL variable of type record ‘Bank Account’ i.e. Record 270. The local parameter of the function is: Return value of the function is: The variable of the function is: Step 4: Now, create a function ‘GetSelectionFilter()’ in ‘Bank Account List’ page. In the above C/AL code, BankAccountTable is a global C/AL variable of type record ‘Bank Account’ i.e. Record 270. The properties of the above function are as follows: The return value of the function is: Step 5: Create a function ‘GetSelectionFilter’ in ‘G/L Account List’ i.e. Page 18 In the above code, ‘GLAcc’ is a global C/AL variable of type record i.e. Record 15. The return value of the function is: The variables of the function are: Step 6: To display the lookup form based on the condition mentioned in step 2, C/AL code needs to be added in the OnLookup trigger of ‘Bal. Account No’ field. In the above code, ‘BankAccountNoList’ is a global C/AL variable of type Page ‘Bank Account List’ i.e. Page 371 and GLAccountPage is a global C/AL variable of type Page ‘G/L Account List’ i.e. Page 18. Following screenshots show the lookup form being displayed based on a option selected in another field: If G/L Account is selected in Bal. Account Type, the following lookup form i.e. ‘G/L Account List’ is displayed. If ‘Bank Account’ is selected in Bal. Account Type, the following lookup form i.e. ‘Bank Account List’ is displayed. Thus after completing the above mentioned steps, Lookup Form on a field corresponding to a particular condition of another field can be displayed in the Request page of the report.
Share Story :
GST- Goods and Service Tax Implementation Update Procedure for Microsoft Dynamics NAV 2016 India
Introduction: Goods and Service Tax (GST) will be applicable at national level. It is a consumption based tax levied on sales, manufacture and consumption of goods and services. This tax will act like a substitute for all indirect tax levied by the government. GST patch has been released and is a part of the cumulative update 17 for Microsoft Dynamics NAV 2016. Pre-requisite: 1. Microsoft Dynamics NAV 2016 (IN version) 2. Cumulative Update 17 for Microsoft Dynamics NAV 2016 IN Purpose: The purpose of the blog is to explain the procedure to update the GST patch on Microsoft Dynamics NAV 2016 IN. Procedure: Download the Cumulative Update 17 for Microsoft Dynamics NAV 2016 IN (CU 17 NAV 2016 IN.zip) from here. Unzip the folder. Take SQL backup of the complete NAV 2016 database to ensure nothing is lost after the Cumulative update 17 which includes GST patch has been installed. Fig 1: SQL Backup of database A cumulative update includes files that are separated into the following folders i.e. ‘APPLICATION’ and ‘DVD’. Application folder includes the following files: Fig 2: Application folder To install application files, follow below steps: Unmodified databases: Import the CUObjects.fob file (highlighted in Fig. 3) into unmodified Microsoft Dynamics NAV 2016 database and replace the existing objects in the database with the cumulative update objects. Fig 3: CUObjects.fob file in Application folder Modified databases: Import the CUObjects.fob file (highlighted in Fig. 3) into the modified database. Replace the objects in the database that have not been modified. Compare and merge the cumulative objects with the objects in the database that have been modified. If a table in the cumulative update has a new field and the same table in your database has been modified, use the Merge: Existing<-New or the Merge: New<-Existing options to import the new fields. Fig 4: Reading objects process after selecting file to be imported Fig 5: Import Worksheet which shows the GST patch objects Fig 6: Number of objects created and replaced after import of objects has been completed All objects in the database have to be compiled after the import process has been completed. Now in the Microsoft Dynamics NAV desktop client and web client, GST patch will be available under Financial Management Department. Fig 7: GST patch available in NAV under Financial Management Department Fig 8: GST Using the above mentioned steps, GST patch can be installed in the Microsoft Dynamics NAV 2016 (IN version).
Share Story :
Embedding Microsoft Dynamics NAV and its web parts in SharePoint online
Microsoft Dynamics is an ERP or Enterprise Resource Planning software that is created by one of the top companies in the world, Microsoft. Many small and medium companies are using Microsoft Dynamics NAV these days. Microsoft Dynamics NAV upgrade is now available. Businesses that are using this software can now update it. This ERP software does help companies to remove the inefficiencies in their processes. Almost all the departments in the organization can benefit when they start to use the ERP software. Once you update the software, you might struggle a few days as you try to understand the way the system works. Here is one of the issues that you might face and how you can handle it Introduction: Microsoft Dynamics NAV can be embedded in SharePoint online which will be available as an app in SharePoint. Thus, NAV data will be displayed on the SharePoint site. The user can then modify and save the data on the SharePoint site through the NAV web client. Also, web parts such as Sales Orders List, Customers List, etc. can be added to the SharePoint site. When the user selects a particular record in SharePoint online, it opens the relevant page in the Microsoft Dynamics web client and after the changes are saved and the page has been closed, the change is reflected in SharePoint online. Pre-requisites: 1. Microsoft Dynamics NAV 2016 2. SharePoint online account Purpose: The main purpose of embedding NAV 2016 in SharePoint online is to make all the NAV data available in SharePoint so that a SharePoint user can check and modify NAV data in SharePoint online itself. Procedure: Step 1: To Register Dynamics NAV as an App in SharePoint Go to the appregnew.aspx page in your SharePoint given as below: https://MyTenant.sharepoint.com/_layouts/15/appregnew.aspx where https://MyTenant.sharepoint.com is the URL of the SharePoint site. The following fields have to be entered to register a new app: Client Id: It will be generated automatically after clicking the generate button. Client Secret: It will be generated automatically after clicking the generate button. Title: Enter a unique title for the app. App Domain: Enter the host name of Microsoft Dynamics NAV web client URL for example cronus.com Redirect URL: Enter the URL of the Microsoft Dynamics NAV web client for example https://www.cronus.com/DynamicsNAV100 Click on the Create button to register the app. Step 2: Create an app catalog Go to the following link: https:// MyTenant.sharepoint.com/_layouts/15/online/SiteCollections.aspx Go to apps and then navigate to app catalog Create a new app catalog site if there is no existing app catalog for the tenant Enter a title for the app catalog and the web site address name. Also enter the administrator name. Click OK and now the app catalog will be created and will be added to the Site Collections list. Step 3: To create app in SharePoint online. Go to Visual Studio and Create a new project – App for SharePoint Enter a unique name for the project. The app should be Provider-hosted After the project has been created, remove the webapp that is created by visual studio automatically. Now go to AppManifest.xml. Replace the highlighted part of Start page link in Visual Studio (shown in the below screenshot) with the web client URL for example: https://www.cronus.com/DynamicsNAV100/WebClient/ Right click on the project and Publish the app. After the app has been published, package the app. Step 4: Upload the app made in Visual Studio to SharePoint in Apps for SharePoint and add the app to Site collections Go to the app catalog created. Click on Apps for SharePoint. Now upload the app to SharePoint. It can be done directly by dragging the app from the folder in which it is created after publishing and packaging to the Apps for SharePoint section. The app will then be copied under apps for SharePoint. Go to Site Collections and navigate to Site Contents. Click on ‘Add an app’ Click on ‘Trust it’ and then the app will be added to SharePoint. Step 5: To add a Microsoft Dynamics NAV web part to SharePoint online Go to Visual Studio and open the project that was created initially. Right click on the project and add a new item ‘Client Web Part (Host Web)’ Enter the Web part URL under ‘Select or enter the URL of an existing web page for the client web part content’ The following code illustrates how to modify the Elements.xml file: <?xml version=”1.0″ encoding=”utf-8″?> <Elements xmlns=”http://schemas.microsoft.com/sharepoint/”> <ClientWebPart Name=”ListPart” Title=”Microsoft Dynamics NAV List Part” Description=”List from Microsoft Dynamics NAV” DefaultWidth=”800″ DefaultHeight=”300″ > <Content Type=”html” Src=”https://www.cronus.com/DynamicsNAV100/WebClient/List.aspx?page=_ThePageId_&pagesize=5&shownavigation=0&showribbon=0&showuiparts=0&isembedded=1/> <Properties> <Property Name=”ThePageId” Type=”int” DefaultValue=”9305″ WebCategory=”Microsoft Dynamics NAV” WebDisplayName=”Page number” RequiresDesignerPermission=”true” /> </Properties> </ClientWebPart> </Elements> The above ‘ThePageId’ property has been defined so that the web part page to be displayed can be modified after clicking ‘Edit’ on the SharePoint page. Change the version number in AppManifest.xml. Again publish and package the app. Now Remove the previous app uploaded in Apps for SharePoint. Drag the app again and replace it in Apps for SharePoint.g. Now Go to Site Collections and navigate to Site Contents. Click on ‘Add an app’. Go to the Site Collection where the app has been added. Click on ‘Edit’. Select Insert an ‘app part’. Select the created web part and add it. Thus, the web part will now be added to the SharePoint page. The above screenshot shows that Sales Orders List web part has been embedded in SharePoint online.On clicking a particular record, it opens the relevant page in the NAV web client. Modifications can be made above. Upon saving and closing this record, the SharePoint page is refreshed and the change is reflected in SharePoint online. Important Note: The web part will not be embedded and displayed if the following property is present in web.config file which is present in the WebClient folder: <add name=”X-FRAME-OPTIONS” value=”SAMEORIGIN” /> Remove/Comment the above line of code in web.config file to embed NAV web parts in SharePoint online because SAMEORIGIN allows framing of the Microsoft Dynamics NAV Web client in another … Continue reading Embedding Microsoft Dynamics NAV and its web parts in SharePoint online
Share Story :
Make the editable fields un-editable based on a condition in NAV
Since Microsoft Dynamics NAV upgrade is available now, it is crucial for you as a company to go for it and get the update. Microsoft Dynamics NAV is an ERP software. ERP stands for Enterprise Resource Planning. Companies can increase the efficiency of their staff as well as their productivity when they use this particular ERP software. Especially, small and medium companies can get a good return on the investment if they invest in this particular software. Here are some of the departments in your organization that is going to benefit well when you use ERP software: Dynamic 365 Finance Manufacturing Units Customer Relationship Management Dynamic 365 Supply Chains Electronic Commerce Analytics and so forth Introduction: This article explains how to change the editable fields into un-editable fields based on certain condition. In this article, we make the page fields un-editable on change of status from Open to Released. For example, the fields like No., Description etc. will be freeze when the NAV page status changes to Released. Pre-requisites: Microsoft Dynamics NAV 2017. Steps We create a Boolean field in the Global variable (Ctrl + G) in the NAV page and sets the property by clicking on (Shift + F4) of the boolean variable ‘IncludeInDataset’ to yes. This property is set to yes when the variable is used as the value of the Editable property, enabled property, visible property or StyleExpr property. Now we select the fields of the NAV which needs to be changed to un-editable and set the enabled properties of the field to the Boolean field name. Now in the C/AL code (F9), in the ‘OnAfterGetCurrRecord’ we place a condition that if the status is Released then the Boolean field ‘fieldeditable’ is set to false this will freeze the fields and only if the status is open the ‘fieldeditable’ will be set to true. By default the value of the boolean variable is true. Below is the screenshot of the NAV page with status open. Below in the screenshot , the approval status is ‘released’.
Share Story :
Creating a new database in NAV 2017
Companies that want to become efficient should choose to adopt an ERP solution into their systems. Only then they can provide the best customer experience to their valuable clients. Microsoft Dynamics NAV is an enterprise resource planning application that helps companies to not only become efficient but to successfully mitigate losses. Once, you select the package, the ERP system providers will come and install the software and provide the necessary training to your staff so that they work efficiently. New users will take some time before they get used to the system. Doing certain tasks might seem to be difficult in the beginning. For example, creating a new database in NAV 2017 might seem like a mammoth task. Here are details of how you can do it. Introduction: Generally, when we install NAV, a default Demo database is always created in the Microsoft Dynamics NAV Development environment. In this blog, a new database is created thus, the developer can use two or more databases in a single NAV Development environment. Pre-requisites 1. Microsoft Dynamics NAV Development Environment 2. Microsoft SQL Server Management Studio. Steps In the Microsoft Dynamics NAV Development environment, Click on file then database and New. A new window opens, enter the database name of your choice and then click on OK. This creates a database with limited number of table objects starting from number 2000000004 i.e Permission set. Here Upgradation Database is the name of the Database Open the Microsoft SQL Server Management Studio as Administrator, navigate to the Demo datebase then navigate to Tasks and select Backup A new window opens, and click on Add button to specify the backup path Click on the button highlighted in the above screenshot, a new window opens, locate the database file and specify the file name and then ok. This will take the backup of the specified database. Now go to the new database created, in this example the database name is ‘Upgradation Database’. Navigate to task then restore then database. Now select device radio button in the source, click on the Assit edit button. Select the folder and select type as All Files. Select the Option and check the overwrite and close existing connection to destination database and then click on OK. Thus, using the above given steps a new database is created with all the standard objects. To access this database from the front end we need to create a server instance in Dynamics NAV Administrator and link it to the newly created database. In the Microsoft dynamics NAV Administrator, right click on the Microsoft dynamics NAV(Local) and select Add Instance. Here Specify the Server Instance name and enter the unique port numbers and click on OK. This creates the server instance. Now to link it to the database, click on the server instance, click on the edit button and scroll to Database fast tab. Specify the Database name and click on save. Now Click on stop and start the services for the Microsoft Dynamics NAV server instance. Open Microsoft Dynamics NAV 2017 front end and click on select server and specify the server instance address and click on tab, the available companies will be displayed then click on OK.
Share Story :
Upgradation of Application Code in Microsoft Dynamics NAV
ERP stands for Enterprise Resource Planning. So many companies are developing ERP software to streamline the processes. Dynamics 365 is one of the ERPs that will help the companies scale up high swiftly. You need to work with the best ERP system providers like CloudFronts if you want this software to make a difference in the lives of people. Microsoft Dynamics Nav is an ERP app that is developed by Microsoft. It is very much part of the popular Microsoft Dynamics family. Companies that use this product can streamline departments such as manufacturing, electronic commerce, supply chains, customer relationship management and so forth. Small and medium-sized companies are going to benefit greatly when they use this software. Here is a segment that you should know in this ERP application. Introduction: Upgradation of objects/data in NAV have to be done after the application has been upgraded to the latest version. Code from different versions of NAV application have to be merged to upgrade the data. This process of merging objects in NAV between different versions is known as code/data upgradation. Pre-requisite: Microsoft Dynamics NAV Windows PowerShell ISE The following objects have to be exported and saved: All Standard objects of the previous version of Microsoft Dynamics NAV in .txt format. All objects of the modified database of Microsoft Dynamics NAV in .txt format. All Standard objects of the higher version of Microsoft Dynamics NAV to which the objects have to be migrated in .txt format. After all these steps are performed, install the latest version of Microsoft Dynamics NAV to which objects need to be migrated. Purpose: The main purpose of Data Upgradation is to move customizations done in any previous version of Microsoft Dynamics NAV to the new Higher version of Microsoft Dynamics NAV database. Steps: Create 4 folders i.e. Original, Modified, Result and Target in the system. Fig 1: Create four folders as specified above Save the backup of ‘All Standard objects of the previous version of Microsoft Dynamics NAV in .txt format’ in the Original Save the backup of ‘All objects of the modified database of Microsoft Dynamics NAV in .txt format’ in the Result Save the backup of ‘All Standard objects of the higher version of Microsoft Dynamics NAV to which the objects have to be migrated in .txt format’ in the Target Open Windows PowerShell ISE as administrator. Run the following commands in it and refresh PowerShell. Import-Module “C:\Program Files\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1” Import-Module “C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\NavModelTools.ps1” These commands help to load Dynamics NAV Cmdlets into the runspace. Fig 2: Windows Powershell ISE commands to load Microsoft Dynamics NAV Cmdlets In Windows Powershell ISE, go to Merge-NAVApplicationObject Cmdlet and enter the path of the four folders created initially i.e. Original, Modified, Result and Target folder. Fig 3: Merge-NAVApplicationObject Cmdlet Fig 4: Merge-NAVApplicationObject Cmdlet gives details of the merge process After running the Merge-NAVApplicationObject Cmdlet the Result folder will automatically be filled with all objects in .txt format. Each object file will be stored separately. Fig 5: Result folder contents Now, in order to create one .txt file by joining all the .txt files present in the Result folder, navigate to Join-NAVApplicationObjectFile Cmdlet in Windows PowerShell ISE. Enter the path of the Result folder as the Source and enter a name of the Destination as ‘Merge.txt’ Fig 6: Join-NAVApplicationObjectFile Cmdlet This will create Merge.txt file in the specified location. Fig 7: Merge.txt file created Now import the txt file into the new database of the Higher version of Microsoft Dynamics NAV. Errors if existing will be displayed during the import process and the import process will stop there. The errors have to then be rectified and the Upgradation process has to be repeated again from step 6. After all errors are rectified and conflicts are resolved, the Merge.txt will be successfully imported. Now, compile all the objects of the new database. You will have a new database with a fully application and data/code including all the modifications and customizations. Conclusion: Using the above process, modifications and customizations done in the previous version of Microsoft Dynamics NAV can be successfully migrated to the Higher version of Microsoft Dynamics NAV.
Share Story :
Creating Quality Group on Item Card using VS code in NAV 2017
Introduction: This article specifies how to add a group called ‘Quality’ in the Item Card Page using VS Code in NAV 2017. The requirement to add this group is to have all the quality related parameters for a particular item. Based on these parameters, when and what test needs to be done is decided. Quality play a very important role in case of a pharmaceutical company and these changes are done keeping in mind the pharmaceutical process. This group contains the four fields. QC Enabled Check box: The checkbox decides whether the quality test should be done or not on a particular item. Retesting Period: Retesting Period is the time span when the item will be tested again. Spec ID: The Specification ID is a look up to the page called ‘Specification Page’ which contains a list of specification which helps in deciding what test needs to be done in testing. WIP QC Enabled Checkbox:(Work In Progress) This checkbox is used to define the quality test should be done or not for a particular item, when that particular item is in WIP WIP Spec ID: The WIP(Work In Progress) Specification ID is a look up to the page called ‘Specification Page’ which contains a list of specification which helps in deciding what test needs to be done in testing when the particular item is in WIP. Prerequisites: 1. Visual studio Code (VS Code) 2. Microsoft Dynamics NAV Web client Steps: A folder is created named ‘Quality extension’. All files with extension as .al are placed here. Firstly, we create a file named ‘Itemtabext.al’ then typing the shortcut ‘ttableext’ a layout for table extension is created. We add the fields here. Here the Spec ID and WIP Spec ID have a look up to the Specification Header table field Spec ID. We create a page extension typing the shortcut ‘tpageext’ which creates the layout for page extension.The ‘Quality Section’ group is added after the Warehouse group hence we use ‘addafter’ Here QC Enabled,Restesting Period and Spec ID are mandatory fields so we set the ‘ShowMandatory’ field to True. In the No. Series Page in the web client, we specify the default number series for Specifications and look up is assigned to Quality Control Set up Page An Action is created in the Item table for calling the Specification Page and Quality Control Setup. Here the Specification No is a look up to the No. Series Code created in Step 3. Here Spec ID is manually typed and the specification name is specified in the description. We need to create a new table ‘Specification Header’ table which contains a list of specification which helps in deciding what test needs to be done in testing. In the table Specification Header, we declare variables and specify a record ‘Quality Control Setup’ and Codeunit ‘No Series Management’. On the Insert trigger of the ‘Specification Header’ table we set the created date as the work date, created by as the UserID. We declare Quality Control setup record to fetch the default number series specified in the No. Series Page. The Quality control Set up table is created which has a table relation to the ‘No. Series’ table field code and page is created which is called in the Web client through an action We create a Codeunit to Test and Validate the field and send the Item for Sampling. We then create a navx package by building it using Ctrl+Shift+B which creates the app.json and to publish our extension we use the shortcut F5 which creates the launch.json file. Here we specify the Extension name and the publisher. In the Web client in the ‘Extension Management’ Page we can view our extension We browse to the ‘Item’ page to view our output. Error faced in the previous Development preview Spec ID in the Quality group is a look up to the Specification Page which contains a list of specification which helps in deciding what test needs to be done in testing. This look up wasn’t working in the previous development preview of NAV using VS Code, this was a bug on table relation/drill down property https://github.com/Microsoft/AL/issues/39 Error resolved after the January development preview update After the Development preview January update, the bug on the Table Relation Property was resolved. Below is a screenshot attached justifying the same. Below is the screen shot of the Issues in the previous preview update which were solved in the January update.
Share Story :
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.