Blog Archives - Page 135 of 151 - - Page 135

Category Archives: Blog

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 :

Out-of-Box Integration of CRM and Financials Pros and Cons

Posted On January 17, 2017 by Admin Posted in

In this article, we are going to walk through the pros and cons of Financials feature of ‘Coupling’ which enables integration of records between Financials and Dynamics CRM. This will help customers understand suitability of using out-of-box Integration. Introduction: Out-of-box Integration enables user to integrate and synchronise data in Microsoft Dynamics Financials record types to corresponding Microsoft Dynamics CRM entities. For more detailed information please refer the link: https://www.cloudfronts.in/integrating-microsoft-dynamics-crm-with-microsoft-dynamics-nav/. Pros: 1. Easy Setup: Setting up Financials in CRM requires you to import DynamicsNAVIntegrationSolution and then just to provide the URL for Financials. Setting up CRM in Financials is easy. You just need to fill in few details and you are set for integration! 2. Initial Synchronisation: Initial Run Full Synchronisation starts all default integration jobs for synchronizing Financial record types and Dynamics CRM entities. Run Full Synchronisation integrates: 3. Real- Time Synchronisation: Integrations and Synchronisation are fast and simple. We can even schedule a synchronisation. Scheduled Synchronisation will synchronise modified coupled records. 4. Sales Order Integration: Sales Order is automatically integrated once it is Submitted in CRM. Cons: 1. No Custom Mappings: Currently, out of box integration mapping contains lot less field mapping. We cannot customize field mapping as we cannot access Financials backend. 2. Synchronisation cannot be triggered from CRM: Synchronisation of records can only be triggered form Financials. We can only view the coupled records from CRM; we cannot trigger synchronisation from CRM. 3. Multiple records cannot be synchronised: Once the initial ‘Run full Synchronisation’ is done, records created thereafter must be synchronised one by one. Note: Only Multiple Customers can be created in Financials. 4. Mandatory fields in Financials are not Mapped: There are lot of fields which are not present in CRM but are mandatory in Financials, those field values are not set by Integration. 5. Limited entities can be used for Integration: Not all entities can be used for Integration. Below screenshots displays the Out-of-Box Integration Mapping Table: Conclusion: Out-of-Box Integration in Dynamics 365 Financials is recommended for organisations having simple requirement for Integrations. Additionally, it is cost saving as you don’t need to pay a hundred dollars for a third-party Integration tool for very simple Integrations.

Share Story :

Moving Data from SQL Server to Excel Using SSIS

Posted On January 16, 2017 by Admin Posted in

In this blog article, we will explain how to move data from SQL server to Excel file using SQL Server Integration Services (SSIS). For moving data from SQL Server to Excel you need to create package, to import data from SQL Server to Excel. Step 1: – Create a Project You need to create a project for moving data from SQL Server to Excel. For this go to visual studio-> File-> New-> Project Once you click on project then choose a business intelligence option to create SSIS project. Then select Integration Services. And then Click on Integration Server Project. Specify name to the project and then click on OK. Step 2: – Create a Data Flow Task We need to add a data Flow task to control flow tab of your package. After adding the data Flow task double click on it will open the Data flow tab. Step 3: – Creating the SQL Server Source Our aim is to move data from SQL Server to Excel. So here our source is SQL Server and Destination is Excel So, drag and drop the OLE DB Source component from the Source then right click on that component then click on edit. Below window will open. Then click on new Click on new Then select your Server name, Authentication type. Select your database name means from which database you retrieving the data. Then click on Test connection to verify that our connection is right or not. And then click on OK. Again, click on OK. Then select the table from Specified database. You can also verify data by clicking on preview button then click on OK. Step 4: – Creating the Excel Destination Our destination is to put the data in excel file. So, drag and drop the Excel destination component from the Destination. Then click on OLE DB Source component and then drag blue line and drop on Excel destination. then right click on that component then click on edit. Below window will open. Then click on new then set the path where you want to create an excel file. Click on OK. Then click on another new button to select the excel sheet name. Click on ok -> ok Then click on drop down bar choose excel file then click on mapping. and then OK. Here, your package is ready execute. Before executing the package verify the source and destination. In destination, there created one excel file with name that you specified in earlier in excel destination with no data. For execute a package, go to Solution explorer ->under the project name -> SSIS Packages -> Package.dtsx. Then right click on that .dtsx and the execute package. it will show the number of rows inserted in Destination i.e. in excel file. And then check the destination. All the data is integrated in destination.

Share Story :

Integrating attachments to and from Dynamics 365 Operations

Dynamics 365 for finance and operations is an ERP solution that helps you to streamline the processes and helps you to become efficient. ERP stands for enterprise resource planning. It is a cloud-based application that helps the team members to work with each other with ease. This product is developed by Microsoft and is one of the most popular ERP solutions in the world.  Installing and using this application is not that difficult. If you put in some effort, you will quickly learn how to use this system with ease. You will get to enjoy so many awesome features when you use this particular ERP suite. If you are a new user, it might take some time before you understand how to navigate or do certain tasks in it.  In this blog article, we will see how we can integrate attachments to and from Dynamics 365 Operations. We need to create a Data Entity which will be general for integrating all attachments to other systems. Attached data will be passed in the Attachment field and transferred in Byte Array format. Prerequisites: D3fO Environment. Steps: Create new Project. Duplicate the Entity Make the Entity general for attachments. Build and Synchronize the Project. Create a new project Open Visual Studio. Go to File -> New -> Project. Select Operations Project. Provide a Project Name and Solution Name. Click OK. Duplicate the ‘EcoResDocumentAttachmentEntity’ Entity Go to AOT -> Data Model -> Data Entities -> EcoResDocumentAttachmentEntity. Right Click EcoResDocumentAttachmentEntity -> Duplicate in project. Make the Entity general for attachments. Change Entity Property. Delete EcoResProductImage DataSource Go to Data Source -> Docuref DataSource -> EcoResProductImage. Right Click EcoResProductImage -> Delete. Delete fields Change Entity name in methods Go to Methods. Press F7. Replace EcoResDocumentAttachmentEntity with new Entity Name. Build and Synchronize the Project. Build the Project and Synchronize the Database. So, this will create an entity to integrate attachments to and from D3fO. Let me know your reviews. I will soon come up with more articles, as I further explore D365 Operations.  

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 :

Enterprise Integration with Azure Logic Apps

Understand Enterprise Integration Pack (EIP) The Enterprise Integration Pack is Microsoft’s cloud-based solution for seamlessly enabling Business-to-Business (B2B) communications. EIP is new features in Logic Apps which adds B2B and XML capabilities. Enterprise Integration Pack brings some of the enterprise B2B capabilities like AS2 and X12, EDI standards support (with EDIFACT coming shortly) and new set of XML capabilities like XML Validation, XSLT Transformation and Flat file to XML encode/decode. Why should you use Enterprise Integration? You can keep all your artifacts at one place like partner, schema, mapping. i.e.  Integration Account. You can simply use all the connectors available to build B2B workflows and integration with 3rd Party SaaS applications. You can also test the Azure functions. Enterprise Integration supported standard Enterprise Integration supports these industry standards: EDI – Electronic Data Interchange EAI – Enterprise Application Integration Minimum Requirement An Azure subscription with an integration account Visual Studio 2015 to create maps and schemas Microsoft Azure Logic Apps Enterprise Integration Tools for Visual Studio 2015 2.0 You can refer this link to understand in the details. Entities Involved in the Enterprise Integration Enterprise Integration Architecture Integration account An integration account is an Azure Account which allows to store all the artifacts required to run the Enterprise Integration for example, schema, mapping, partner agreements, certificates. You need to include this integration account while developing the logic otherwise you will not be able to use the Enterprise Integration features To understand in the details, you need to refer here. Partner  Partner is the entity that takes part in the integration process for which the data exchange process works. Before creating a partner participating organization needs to agree to share the information which will help both identify and validate messages that are sent by each other. Partners are used to create agreements. An agreement defines the details about the messages that will be exchanged between partners There must be two partners and one of them must be your own organization. The partner which represents your organization is known as host partner and the second partner is known as the guest partner. The guest partner can be another company, or even a department within your own organization. For more information on the partner and how to create a partner, you can refer this link. Agreements Agreements allows to communicate using the industry standard protocols. It makes is easy for different organization to send the data in the know format which improves the efficiency of data exchange. It is very easy to create and manage the agreements. The standard protocols that are used to Enterprise Integration AS2 X12 EDIFACT For more information on the partner and how to create a partner, you can refer the below link: https://docs.microsoft.com/en-us/azure/app-service-logic/app-service-logic-enterprise-integration-agreements Data Manipulation and Editing Schemas Many times it happens that while sending the data from one system to another the data format for both the system may differ. In that case, you may not be able to process the data on the target system. In that case you can create a schema which will validate the data structure received from the source system. To learn, how to create a schema you can refer the this link. Maps Map is a XML documents which transfers the document from one format to another format. Let’s assume that you are sending data from SalesForce to Dynamics 365. The two systems have different formats of data structures of date ‘DDMMYYYY’ and you want that to be in ‘MMDDYYYY’, then you can use the map to format the data. You can refer this link to understand the maps. XML message validation In B2B scenarios, the partners are need to have agreement to validate the XML message(s). In Enterprise Integration, you can validate the XML using the predefined XML schema XML transform XML transform provides the ability to convert an XML message based on the requirements of a destination endpoint. Other Terminology AS2 AS2 (Applicability Statement 2) is a specification about how to transport data securely and reliably over the Internet. Security is achieved by using digital certificates and encryption. MDN The Message Disposition Notification (MDN) is the acknowledgment sent in response to an AS2 message. If an MDN is enabled, the AS2 transmission is not complete until the MDN has been received and verified. BizTalk Server will always attempt to return an MDN to indicate the status of message processing, even if an error occurred in processing the AS2 message. Features and use cases The AS2 and X12 decode and encode actions allow you to receive data from and send data to trading partners using industry standard protocols using Logic apps. You can use AS2 and X12 with or without each other to exchange data with trading partners as required. The B2B actions make it easy to create partners and agreements in the Integration Account and consume them in a Logic app. By extending your Logic app with other actions you can send and receive data to and from other applications and services such as SalesForce. Sample code You can refer the below link for the AS2 send and receive, this sample code uses the AS2 technology the exchange the message: https://github.com/Azure/azure-quickstart-templates/tree/master/201-logic-app-as2-send-receive You can use the below sample code the use the schema and map validation: https://github.com/Azure/azure-quickstart-templates/tree/master/201-logic-app-veter-pipeline  

Share Story :

Relevance Search in Dynamics 365

Posted On January 6, 2017 by Admin Posted in

Introduction: Relevance Search brings the Global Search Experience powered by Azure Search. It uses scoring concepts where score is the indicator of the item’s relevance i.e. higher the score, more relevant the item. Users will get the comprehensive search results quickly in a single list that is sorted by relevance. How it Work’s Basically when a user looks for something like “Nancy ran in the retail store in New York”, the search is executed against the Azure Search Index and the results are returned with a match to any word present inside that particular sentence. This search will also look for the inflectional words like in our case words like running, run, runner and then will display the results accordingly. No wild cards are required to search anywhere in the text. Enhancements in Dynamics 365 Earlier Relevance Search was enabled only in web Browser but now it is enabled for Mobile Client i.e. on Mobile and Tablets. Explore results using Filters and Facets Global Facets Users will be able to see the refined search by Record Type based on following categories like Entity, Owner, Modified On and Created On. These categories cannot be changed as they are predefined by the system as shown in the leftmost image shown below. Entity Specific Facets When user clicks on particular record type such as Account, then user can see the additional facets specified for that particular entity as shown in the rightmost image attached below in our case Primary Contact and Industry. These Entity Level Facets are customizable based on the personal choice i.e. they can facet fields that they would like to see for every searchable entity in their Personal Options. Search within the Documents in Dynamics 365 Relevance Search will now search within the documents that are attached in Notes on a particular record. Relevance Search will also search in the attachments that are added in the Email in CRM. Search in the records that are being shared with you Search in the text of Option set and Lookup fields on any entity. Set Up and Configuration Enable Relevance Search Only System Administrators can enable Relevance Search. Configure Fields in Quick Find View The fields that are added in Quick Find View becomes the part of External Search Index. There is no limit on how many searchable fields can be added for a particular entity. However, there is a limit on total number of indexed fields i.e. maximum of 1000 fields can be added in an organization. Set Managed Properties System Customizer needs to check the managed properties on the entity. As the “Can Enable sync to External Search Index” option must be true. Configure Entities for Relevance Search The System Customizer can add entities that should be enabled for external searching in the Default Solution. So when a user selects the entity, the number in the parentheses indicates the number of fields of entity that will be synced to external search index shown in image below. Below the progress bar of Total Fields shows the percentage of indexed fields to maximum number of fields allowed of searchable fields. Configure Facets and Filters Facets and Filters refines the search in the organization. They are available on the left hand side of the pane immediately after user searches for some term. As mentioned above they can be customized based on the personal requirements. They can be configured from the Personal Settings as shown in the images given below. Drop down list contains the entities that are enabled for Relevance Search. And for a particular entity up to four facets fields can be selected accordingly. Users can modify the preference of the fields based on their choice. Key Take Away Relevance Search is only available for Dynamics 365 Online and now on Mobile Clients too. By Default, Relevance Search is disabled and can be enabled only by System Administrator. Enabling Relevance Search has no impact on the storage consumption and cost for Dynamics 365 database. Facets and Filters can be configured according the User Preference and can redefine the search as per the user’s personal choice. Thus, above are some highlights for Relevance Search in Dynamics 365.  

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 :

Understanding Subgrid functions in CRM Online

Using the new subgrid functions, there are 2 ways to get count of the subgrid data. Based on requirement, we have to use one or the other way for achieving the requirement. getTotalRecordCount(): It determines the total no. of records that match the filter criteria of the view. Features: 1. The count is NOT limited by the current page size. You will get the total size across all pages. 2. You may not also get the latest count of the records using this function if new records are added on the subgrid. How to get around #2 above to get correct count: The idea is to make the grid refresh before executing the “getTotalRecordCount” function, which will enable us to get the correct count. We also have to add an onload event handler for the grid control. Whenever grid is refreshed through code or manually, the onload function will trigger. Note that we cannot do this without onload event. If we try to execute “getTotalRecordCount” just after the refresh line without onload event handler, you will get an error as the grid refresh happens asynchronously and it may not be ready. Sample Code  var myContactsGridOnloadFunction = function () {  console.log(“Contacts Subgrid OnLoad occurred”); var count = Xrm.Page.getControl(“Contacts”).getGrid().getTotalRecordCount();   };  /// bind an onload event to the grid control  Xrm.Page.getControl(“Contacts”).addOnLoad(myContactsGridOnloadFunction);  /// refresh the grid. This will trigger onload event.  Xrm.Page.getControl(“Contacts”).refresh() getRows().getLength() getRows() will return collection of all gridrows in the grid. Features: 1. It will only return the rows currently visible on the grid. 2. getRows().getLength() will return the count of rows currently visible 3. Unlike getTotalRecordCount, we need not refresh the grid to get the correct row length using this function. Uses: In cases, where we want to know if the grid is empty we can use “getRows().getLength()” instead of getTotalRecordCount to know if the count is 0 or Not. Sample code: var rows = Xrm.Page.getControl(opptyProductSubGridName).getGrid().getRows(); var rowLength = rows.getLength();

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 :

SEARCH BLOGS:

[gravityform id="36" ajax="true"]

FOLLOW CLOUDFRONTS BLOG :