Applying Default / Mandatory Dimension in NAV / Business Central
Introduction: In this blog, I aim to provide how to set Mandatory Dimensions on Items, Customers, Vendors, and G/L Accounts and how to optimize this process using Configuration package. Pre-requisites: Microsoft Dynamics NAV. Microsoft Dynamics Business Central. Understanding of Dimensions in NAV / BC Theory: Automatic Dimensions can be added for the G/L Accounts, Customers, Vendor, and Items. The Value Posting can be selected as per the below Table. Value Posting Explanation Blank No posting restriction.Transactions can be posted with any dimension value or without a dimension value. Code Mandatory Any dimension value for the given dimension can be added. If dimension value is blank then NAV / BC will throw an error Same Code Only a single dimension value defined in Default Dimension can be used while posting. No Code Dimensions must not be specified on the transactions. This also implies that you can add the Default Dimension, No-Dimension, Mandatory Dimension and Manual Dimension only when needed using the Default Dimension functionality. Solution: 1. Apply Mandatory Dimension on Items: Go to Items > Select the Item and Open Card Page > Click on Dimensions Action. In the Default Dimension Table, Table No. for Items Table is 27 which is automatically selected. The value posting is also selected in the table based upon what option is selected. 2. Apply Mandatory Dimension on Customers: Go to Customers > Select Customer and Open Card Page > Click on Dimensions Action In the Default Dimension Table, Table No. for Customer Table is 18 which is automatically selected. The value posting is also selected in the table based upon what option is selected. 3. Apply Mandatory Dimension on Vendors: Go to Vendors > Select Vendor and Open Card Page > Click on Dimensions Action In the Default Dimension Table, Table No. for Vendor Table is 23 which is automatically selected. The value posting is also selected in the table based upon what option is selected. 4. Apply Mandatory Dimension on G/L Accounts: Goto Chart of Accounts > Select the G/L Account and Open the Card Page > Click on Dimensions Action. In the Default Dimension Table, Table No. for Chart of Accounts Table is 15 which is automatically selected. The value posting is also selected in the table based upon what option is selected. NOTE: You can give multiple Mandatory Dimensions as well 5. Using Configuration Package: In Configuration Package, add the Table 352 Default Dimension and Export the Excel. You can add the dimensions referring to the points 1-4 and insert you data in the Excel. Import the Excel Package and Apply Data. Conclusion: Applying manually for each Master Record can be tedious and time consuming. In this blog I tried to add few sample records so that we can take help of this samples to create our conditions and insert data into Excel and apply it on all the Master Records.
Share Story :
Multiple Production Tenant in Dynamics 365 Business Central
Problem Statement: I have a requirement where the contents of the General Journals are to export to Excel and also can create new entries by importing the same Excel file as well. A major troublemaker is the dimensions as only Dimensions 1&2 ate stored in tables and can be validated easily but 3-8 are set at run-time through variables on the page. In this blog, I’ll be attempting to resolve how to automatically apply dimensions from 3-8 using the code. Pre-requisites: VS Code AL Language Extension Functional knowledge of Dimensions Microsoft Dynamics NAV / Business Central Solution: 1. Understanding how dimensions work technically: Any dimensions that are inserted in an entry in the system are validated to be stored in the Dimension Set Entries table. Dimension Set Entries table of which Dimension Set ID is set on the Table. This Dimension Set Entry ID is stored on the entries to be used as a reference. For instance, if we want to Apply Dimensions to General Journal Entries, the Dimension Set Entries ID is stored on General Journal Lines Table. Dimension Set ID on General Journals Out of 8 total dimensions, 2 dimensions are stored on the table. These 2 dimensions are also known as Global Dimensions. 2. Hack into Business Central: When importing, the entry either consists of a Dimension Set ID. If the Dimension Set ID is set to 0 which means no Dimension is applied yet. To apply the dimension to the entry using the code, we can use the standard available code ValidateShortcutDimCode(Dimension_No, Dimension_Value); Dimension_No: The position of the Dimension. Dimension_Value: Dimension Value that is to be applied. For Example:Rec_GenJnl.ValidateShortcutDimCode(3, SD3); When Exporting the Dimension into an Excel Format, you can use the Dimension Set ID present on the Entry to lookup into Dimension Set Entries Table. To Export the Dimensions using the code, you can use the following code: Clear(Rec_DimensionSetEntry); Rec_DimensionSetEntry.SetRange(“Dimension Set ID”, Rec_GenJnl.“Dimension Set ID”); Rec_DimensionSetEntry.SetRange(“Dimension Code”, Rec_GLSetup.“Shortcut Dimension 3 Code”); IF Rec_DimensionSetEntry.FindFirst() then MESSAGE(Format(Rec_DimensionSetEntry.“Dimension Value Code”)); Output: After Importing from Excel: After Exporting to Excel: Conclusion: Thus, using standard code present in Business Central, we can Import dimension details from other sources such as Excel. I also learned about the Dimension Set Entry table and how this is used to store the data on the Entry table using Dimension Set ID. Overall this is a big step where I learned how to import dimensions which are more than the 2 Global Dimension. Thanks for taking a keen interest in reading my blog.
Share Story :
Using “startswith” Filter Query in MS Flow
Introduction This blog explains how to use “startswith” filter query in MS Flow. Use Case Using MS Flows to retrieve the bunch of students who’s mobile numbers begin with +91 and send them a text (using Twilio connector) regarding the Top Indian Universities. The “starts with” filter query in MS Flows allows to easily achieve this functionality. Steps to be Followed: We will use “Dynamics 365 – List records” Actions. Enter the Organization Name and select the entity. Filter Query: startswith(new_phonenumber,’+91′) “new_phonenumber” is the logical name of the field which stores the phone number of students. ‘+91’ is the value of phone number by which we want to filter the retrieved student list. Enter the above query in Filter Query: Run the flow to test.It will return all the students whose phone number starts with “+91”
Share Story :
Print pro-forma invoice in Dynamics 365 Finance and Operations
Creating a pro forma invoice on dynamics 365 for finance and operations is a pretty straightforward task. A pro forma invoice is a crucial financial document that people use in businesses. In a nutshell, a pro forma invoice is more or less like an estimate that companies share with their client before sending them the actual invoice. The actual amounts can change if there is a difference in the quantity of material as well as the labor before preparing the final bill. Many people struggle to locate, view, or to print this document on dynamics 365 as it can be confusing. In this article I am going to demonstrate how to view/print pro-forma invoice. A pro forma invoice is an invoice that is prepared as an estimate of the actual invoice amounts before the invoice is posted. You can print a pro forma invoice either for a customer invoice for a sales order or for a free text invoice. Step 1: Configure Print management from Account receivable>Setup>Forms Step 2: Right click on Customer invoice and click New Step 3: Go to All sales orders, Select an order which is in Open state. Step 4: Go to Invoice tab and click on Pro forma Invoice Step 5: In Quantity select All and in Print options enable Print Invoice Step 6: You may click on Export to save the document or print it Hope this helps!
Share Story :
Using “contains” Filter Query in MS Flow
Introduction This blog explains how to use “contains” filter query in MS Flow. Use Case Retrieve all the Accounts whose name contains ‘cloud’. Steps to be Followed: We will use “Dynamics 365 – List records” Actions. Enter the Organization Name and entity.Filter Query: contains(name,’cloud’) name is the logical name of the field which stores the account name. ‘cloud’ is the value of account name by which we want to filter the retrieved account list. Enter the above query in Filter Query: Run the flow to test.It will return all the account whose name contains “cloud’.
Share Story :
Setting Ribbon Icons on the Unified Interface in D365
So, since adoption of Unified Interface is growing, people are asking – “What happened to the Ribbon icons?”. Well, a simple answer to this is tweaking the implementation a little. Typically, you have custom icons on your classic Web UI that look like this – But the same looks like a puzzle piece in the Unified Interface – So, here’s what you need to do. Icons on the Unified Interface take SVG format. You’ll need to take you existing PNG Web Resources Creating SVG Icons Like most online services or applications, you can easily convert images to SVG. In this example, I’m using this online tool – https://www.online-convert.com/ Or you can try this too which I found quite a few people recommended – https://www.syncfusion.com/downloads/metrostudio For this example, I used https://convertio.co/png-svg/ And I got my converted SVG document downloaded. Now, create a new Web Resource in SVG and Upload the same. Ribbon Workbench Once your Web Resource for the SVG format is set, going back to your Ribbon Workbench customization work space, go to the Button where you wan to update the icon and select the SVG Web Resource under Modern Image as shown below Publish Changes and See Once your customization are published, you can simply refresh and check that your image has been updated Note: An online converted might not give you an accurate image. However, it is best recommended to create SVGs on an app. I’ve heard recommendations about https://www.syncfusion.com/downloads/metrostudio Hope this helps!
Share Story :
Resolution to bulk import Time Entry issue of importing Cancelled Time Entries in PSA V3.X
Problem Definition: Post upgrading to V3 I faced issues while importing the time entries from my Resource bookings. This was not the case with V2. In V2 when I went to Import Time Entries from Resource Bookings, it used to pick up all the time entries that were in Active State. Resolution: The resolution to this was simple, but, little tricky. Below are the steps to be followed to get the issue resolved. Step 1: Go to the D365 – Custom App as shown in the below image. This will take you to the classic interface of D365 CRM as shown below. Step 2: Navigate to Settings à Customizations Step 3: Click on Customize the System This will open a screen as shown below. Step 4: Navigate to Entities- Bookable Resource Bookings – Views and open the view named Resource Bookings for Time Entries Import Step 5: Click on Edit Filter Criteria and add a condition Status – Equals – Active These conditions ensure that only Active bookings are to be selected. Then click on OK and Save and Close. Finally, click on Publish All Customizations. Now when you try to import the time entries from Resource booking it will import only the Active time entries and leave behind the canceled time entries. This blog reflects my personal findings and based solely on my experience of using PSA for the last 3+ years. For those who are looking for a platform that can track and manage the entire procedures of sales and project management, I would highly recommend them to try Microsoft dynamics 365 for project service automation.
Share Story :
Review Data Imported From Excel To Configuration Package using Configuration Import Preview
Introduction: The Import from Excel on the Configuration Package page is used to import data from excel. It can be used to even before a configuration package is created. To avoid confusion and unnecessary retries when using these actions, you can now use the Config. Package Import Preview page to get an overview of the Excel file content to be imported. The page opens when you choose the action and shows the list of configuration packages and tables, organized on different sheets, in the Excel file that you are trying to import. The page also explains if the Import from Excel action will create a new configuration package or update the existing one, and if the action will create new configuration package lines (tables) or update existing ones. Pre-Requisites: Microsoft Dynamics 365 Business Central Steps: To import the Purchase Order Data : Open the Config. Package Card page. Select the table for which you want to import data, and then, on the Tables tab, choose the Import from Excel action. 3. Locate and open the file that you want to import data from. 4. On the Config. Package Import Preview page, review the content that will be imported. The Config. Package Import Preview page provides an overview of the Excel file content to be imported. It also indicates if a new configuration package is created or the existing one is updated, and if new configuration package lines (tables) are created or existing ones are updated. Choose the Import Action. 5. A new Package is created on the List page and the data in the configuration package can be viewed by clicking on the package. Conclusion: Thus, this way the data from the Excel is now imported into configuration package and with the help of Configuration Package Review page the data that is imported can be reviewed and checked.
Share Story :
Workaround to XMLPort not supported in Business Central
Problem Statement: While I was working on some custom EFT project, I thought of using XMLPort as it is the safest and easiest method to get the data successfully directly from the tables. Unfortunately, XMLPort is not supported to work on WebClient and I was stuck with writing code to do exactly what XMLPort would do.Also, another issue that Business Central d extension support is using File methods i.e Open, Write, Close, etc. Introduction: In Business Central even if you’re not given explicit rights to deal with files directly there are streams using which we can be downloaded as files. Enough of introduction, let’s start working now! Pre-requisites: VS Code AL Language Extension Microsoft Dynamics Business Central. Demonstration: 1. Creation of File Contents: In this case, I’ve simply text string ‘Hello World!’ Although it’s perfectly possible to create more complicated strings such as XML contents using a combination of loops and text manipulating functions as needed. 2. Creation of Streams: Using TempBlob.Blob.CREATEOUTSTREAM(Var_OutStream) initialize the OutStream. Using Var_OutStream.WriteText(Var_FileContent) write the text to the BLOB Using TempBlob.Blob.CREATEINSTREAM(Var_InStream) read the contents of BLOB to InStream variable. 3. Downloading the contents of the Streams to a file: Using DownloadFromStream(Var_Instream,FileName.FileExtension) download the contents of the InStream to a file. Output: Conclusion: That’s exactly how I was able to create a Custom Text File and download it in Business Central. You can even try with any type of text-based exports.
Share Story :
Defining the Aternate Key with Lookup/Entity Reference
If you want to set the alternate key to detecting duplicate record based on lookup it was not earlier. If you want to have duplicated detection based on you would not be able to that you have to write a plugin to get that result. Description: You can now achieve a duplicate detection rule by defining the lookup as an alternate key. You can create an alternate key by following the below steps To define the alternate keys, go to Go to Settings> Customizations Choose Customize the System–>Components ->Entities –> Entity–>Keys. Choose New. 3. On the form, fill in the required fields (Display Name and Name) and then choose and add the fields to the key. Save the key. In the example shown here, we used the ParentId field in the alternate key definition. Conclusion Hope this helps while defining the alternate key with lookup/entity reference
