Print Custom Size Report using Document Routing in D3FOE
Introduction: Recently I was working on Cheque Report. I created a custom size Cheque design and it was working fine while downloading it. Then the task was to print the cheque and test but the printout was off size. In this blog I will guide you how the custom size report prints using document routing agent in Dynamics 365 for Operations. Pre-requisites: Install Document Routing agent Configure Network Printers Adobe Reader Note: Click here to refer how to configure Document routing and network printer Steps: 1. Setup Printer Page Size You need to configure your printer to print custom size report. Go to Printer Paper size and select custom. A new dialog will ask for page size. Enter the Custom Paper size. Make this custom size as your default size. 2. Setup Adobe Reader Once you print the report from Operations with Print Destination as Printer, The Document Routing will take the command and send the document to Adobe Reader. Thus, it takes printing configurations of Adobe Reader and send it to Printer for printing. So, we need to setup the Adobe Reader as well. Please refer below screenshot for Adobe Reader Settings. Conclusion: After setting up Printer size and Adobe Reader with same orientation and page size you can print the Custom size report from D365 Operations directly to Printer with correct print layout.
Share Story :
Connecting Dynamics 365 Contact packs in Power BI
Introduction: In this blog you will see how we you can use content pack for D365 in Power BI. Content package that are created are easy for your team to find — they are all in AppSource. Because they’re part of Power BI, they leverage all the features of Power BI, including interactive data exploration, new visuals, Q&A, integration with other data sources, data refresh, and more. Steps: Login to your Power BI Account > Click on Get Data. Click on Services. Select the proper content pack from the AppSource. Click on Sales Analytics for Dynamics 365 > and click on “Get it now”. It will as about the CRM account, and the Fiscal Year End Month Number, fill in the details and click next. By default, it will use OAuth with the current account that is logged in. After successfully login, dashboard will start with pumping up with data. Importing data will take some time, and after successful login you will get the ready content package Dashboards and report. You are set and good to go, try other content pack as well. Currently there are 21 Content pack available for different flavour of D365, try them there are superb.
Share Story :
How to avoid data deletion when Dynamics NAV 2018 extension is published from VS Code
Introduction: There was a bug till NAV 2018 CU 1 update that whenever a NAV 2018 extension is published from VS Code, all the data which was inserted earlier gets deleted. Pre-requisites: Microsoft Dynamics NAV 2018 CU 2 Visual studio code (VS Code) Steps: 1. Install Microsoft Dynamics NAV 2018 CU 2 2. Install VSIX Extension for VS Code Click on Extension button at the Left corner of VS code. Click on the more button ( three dots) and select Install from VSIX. Navigate to the path “CU 02 NAV 2018 NA\NAV.11.0.20348.NA.DVD\ModernDev\program files\Microsoft Dynamics NAV\110\Modern Development Environment” to install VSIX. 3. Open the launch.json file and enter schemaUpdateMode to synchronize How data synchronization works? The data synchronization between each publish is controlled by schemaUpdateMode setting, which is specified in the launch.json. This setting consists of two options; Synchronize and Recreate. The default value for schemaUpdateMode is set to the Synchronize mode, which means that every time you publish an extension to the development server, the data you entered previously stays. If you do not want to synchronize the sample data with each publish, you can change the schemaUpdateMode setting from Synchronize to Recreate Recreate mode: When you set the schema update mode to Recreate, all the tables and table extensions are recreated at every publish, which means that all the data in those tables are lost. This means that you will get empty records when you publish your extension.
Share Story :
Dynamics GP Sales Invoice Unit Price always 0
Introduction: Recently, we faced an issue with integrating Unit Price to Dynamics GP through GP Web Services using TIBCO Cloud Integration. We were integrating the Unit Price from Dynamics 365 but the Unit Price in an Invoice was created with $0 Price. In this article, we will learn to resolve the issue for Dynamics GP Sales Invoice Unit Price always setting to $0 when creating through GP Web Services. Resolution: In Dynamics GP Web Service Policy Configuration for Update Sales Invoice Policy, you need to update the “Calculate Unit Price Behavior” to “Do Not Calculate”. Also, make Sure that you have selected the right Company and assigned proper roles for the policy. The role should not be Default. Note: The “Calculate Total Amount Behavior” should be “Calculate” otherwise the Unit Price will be always 0, even if you set the “Calculate Unit Price Behavior” to “Do not Calculate”.
Share Story :
Connecting D365 with Power BI Desktop
Introduction: This blog will help you through connecting power BI to your D365 environment. Steps: Open Power BI Desktop, click on Get data connection, and click on More… Go to Online Services > then select Dynamics 365 (Online) > then click on connect. It will ask you about Web API URL, this is not the CRM URL, it is the API URL that will allow you to communicate to you D365. You can locate the Web API in your Dynamics 365: Go to Dynamics365 > Go to Settings > Customizations. Select Developer resource inside Customizations. Inside the Developer Resource you can locate your Web API URL. Copy the Service Root URL and paste it in your Power BI Desktop. After adding the URL click on and click on the Organizational Account and click on Sign-in. After successful sign in, click on connect, you will see list of entities available for the login. Select the tables and get going, you are good to go now.
Share Story :
Fetch Parameter name from ID for SSRS Report in D365 Operations
Introduction: I was stuck in an issue recently where I was working on SSRS report with multiple filter parameters. In multiple parameter, one parameter was Brand ID and in report I had to display the Brand name instead of its ID. In this blog article, we will see how we can get the name of brand as parameter using brand id in Dynamics 365 Operations. Steps: Override getFromDialog() Method getBrandName() method to fetch Brand name. parmBrandName() to set the value 1. Override getFromDialog() Method: In UI Builder class override getFromDialog() method. This method gets the value of Brand Id. /// <summary> /// Transfers data from the dialog into the data contract object. /// </summary> public void getFromDialog() { super(); RecId r; r = contract.parmEcoResCategoryId(); if (r) contract.parmBrandName(this.getBrandName(r)); } 2. getBrandName() method to fetch Brand name: This method is used to find Brand name and called from getFromDialog() method. The return value is passed as parameter to contract class. /// <summary> /// This method looks up name of the organization using the hierarchy relationship id. /// </summary> /// <param name = “hierarchyRelationshipId”>The hierarchy relationship id for the organization.</param> /// <returns>Name of the organization.</returns> public EcoResCategoryName getBrandName(RecId hierarchyRelationshipId) { EcoResCategory category; select firstonly Name from category where Category.RecId == hierarchyRelationshipId; return category.Name; } 3. parmBrandName() to set the value: This method gets or sets the value of Category Name. /// <summary> /// Gets or sets the value of the datacontract parameter Category Name. /// </summary> /// <param name=”_categoryName”> /// The new value of the datacontract parameter CategoryName; optional. /// </param> /// <returns> /// The current value of datacontract parameter CategoryName /// </returns> [ DataMemberAttribute(‘Retail Category Name’), SysOperationLabelAttribute(literalstr(“Brands”)), SysOperationHelpTextAttribute(literalstr(“Brands Category”)) ] public EcoResCategoryName parmBrandName(EcoResCategoryName _categoryName = categoryName) { categoryName = _categoryName; return categoryName; } Conclusion: This blog showed how we can fetch the parameter value from another parameter in SSRS report using filter parameters with Contract and UIBuilder class in D365 Operations.
Share Story :
Open new form with fields pre-populated using Xrm.Navigation in D365
Introduction: Xrm.Navigation provides navigation related methods like openAlertDialog, openConfirmDialog, openErrorDialog, openFile etc. In this blog we will be discussing about openForm method which opens an entity form or a quick create form. There might be requirements to open a new form with certain fields pre-populated on certain conditions or to open a specific record. Implementation: Step 1: Syntax:Xrm.Navigation.openForm(entityFormOptions,formParameters).then(successCallback, errorCallback) Here the parameter entityFormOptions is an Object and is a required parameter. Step 2: In the below example taken, we have written a script on the contact form to trigger on Save which will open up the quick create form with values filled in some of the fields. As we can see in the below image we have passed the execution context as the first parameter. Step 3: The code for the same is given below: scripting={ myfunction:function(executionContext){ debugger; var formContext = executionContext.getFormContext(); var entityFormOptions = {}; entityFormOptions[“entityName”] = “contact”; entityFormOptions[“useQuickCreateForm”] = true; var formParameters = {}; formParameters[“firstname”] = formContext.getAttribute(“firstname”).getValue(); formParameters[“lastname”] = formContext.getAttribute(“lastname”).getValue(); formParameters[“fullname”] = formContext.getAttribute(“fullname”).getValue(); formParameters[“jobtitle”] = “Developer”; Xrm.Navigation.openForm(entityFormOptions, formParameters).then( function (success) { //Any Specific action to be performed console.log(success); }, function (error) { //Any specific action to be performed console.log(error); }); } }; Step 4 : After updating the value and saving the form a quick create form opens up with some of the fields filed out. We get the value of the fields using the formContext.getAttribute(“fieldname”).getValue(); The successCallback and errorCallback are optional. In the Unified Interface the successCallback and the errorCallback function will be executed only if the we are opening the quick create form. Step 5: As seen in the image below we make some changes to the contact form and save the changes. After saving a new contact quick create form opens up with the first name, last name and job title fields filled. Here in our case we have specified entityFormOptions[“useQuickCreateForm”] = true; If this property is not set a normal form open’s up with the values filled in the fields in the same window. If we want to open the new record in a new window we should specify entityFormOptions[“openInNewWindow”]= true which is a Boolean value and it is an optional field. Step 6: If we want to open a specific record we just specific the following entityFormOptions[“entityName”]=”account” entityFormOptions[“entityId”]=”Specify Guid Here” Hope this helped!
Share Story :
Deferral of Income & Expenses in Navision
Introduction: Microsoft Dynamics NAV allows you to set up deferrals of income and expenditure. These allow you to post transactions into a particular month but then spread the financial effect over a number of periods in a way you can specify. This article explains how to set up and use this functionality. Set up: First, you need to create a Deferral Template which will define how the deferral will work. To do this, type “deferral template” in the top right hand corner of the screen and open the Deferral Template list. You should see a screen like the following:- Either click on Edit to modify an existing template or New to create a new one. You should then see the following screen:- Fill in the fields as follows:- Deferral Account – This is the GL Account code the deferral will initially be posted to. This would normally be a Balance Sheet account; Deferral % – How much of the initial posting is to be deferred (can be from 1% to a maximum of 100%); Calc. Method – How the deferral will be calculated. This can be one of:- Straight-Line, where an equal amount will be applied per period from the Starting to Ending Dates specified in the schedule; Equal per Period, where an equal amount will be deferred per period; Days per Period, where the amount deferred per period is based on the number of days in that period as a proportion of the total number of days in the whole deferral period; User-defined, where the amounts for each period are entered manually. Start Date – This can be one of:- Posting Date, the Posting Date of the document that generates the deferral; Beginning of Period, the beginning of the period in which the document is posted; End of Period, the end of the period in which the document is posted; Beginning of next period. No. of Periods – How many periods the deferral will be spread over. These are only default values, as we shall see later they can be amended on individual transactions if necessary. The next step is to assign the template to transactions. The simplest way to do this is to assign it to either a G/L Account, Resource or Item. To assign it to a G/L Account, open the Chart of Accounts list, click on the account you wish to set the template for and click on the Edit button. You should see the following screen:- On the Posting tab, set the Default Deferral Template as required. You can now start to use the Deferral functionality. We will use a purchase order as an example. Create a new purchase order and add a line for the G/L Account code you assigned the Default Deferral Code to. Add a Quantity of 1 and a Direct Unit Cost. Use the Choose Columns functionality to make sure you can see the Deferral Code field. By default, you should able to see the code as in the screen shot below. You can add, delete or change the code if you wish. To see the effect the posted deferral will have over time, drill down on the Line button below the Lines caption on the page and click on the Deferral Schedule option. The following screen should appear:- You can amend the deferral amount and dates and change the spread of the amounts over time if needed. If you do make any changes, you may need to click on the Calculate Schedule button at the top of the page to recalculate the deferral amounts. Now receive and invoice the order. Note: You will need to set the Posting Date range on either your User Setup record or the General Ledger Setup date range to allow you post up to the last period the deferral will cover. If you do not, you will see an error message that a Posting Date is not within the allowed posting date range. Now bring up the Posted Purchase Invoice you created when you invoiced the order and click on the Navigate button. If you view the G/L Entries for the invoice you should see something like the following:- As you can see, the cost has been posted to the deferrals g/l account rather than the account specified on the purchase order and the first month has then been reversed out and posted to the original account in accordance with the deferral schedule. Note that you cannot see the reversals of the deferral over the subsequent month of the schedule. To display these, remove the filter of the Posting date by clicking on the red x button immediately to the left of it. You should now see the following screen:- Conclusion: As you can see, this shows the original entries and the entries that reverse out the deferral over the period of the deferral schedule. This Feature of Deferral is Available after NAV 2016 version only.
Share Story :
Creating a Control Add-in using Javascript and calling it in AL.
Introduction: In NAV 2017, control add-ins were called through .NET code which is imported as .ZIP files. With NAV 2018 .NET is not supported in extensions. Thus we’ve to perform the following steps to make a Control Add-in in Javascript. Pre-requisite: 1. NAV-2018 2. VS Code Procedure: Create a Startup script as start.js: Startup scripts are loaded whenever the NAV object containing the control add-in starts. Basically, the startup scripts are used for initialization. Create a Javascript file as demo.js : Contains most of the logic that the control add-in performs. Create a control add-in object in AL: Control Add-in objects are used by NAV to register the control add-in and events and procedures on which the control add-in works. Create a NAV object using AL: This object generally contains the control add-in integrated into the standard, created or customized NAV objects. This object acts as the starting point where events are performed. Output: Added Control Add-In: Invoking on INIT: Script Invoking on Event: Conclusion: Thus, we can create control add-in using Javascript and access in NAV .AL objects using extensions
Share Story :
Setup multiple No. Series for a single field in NAV
Introduction: This blog shows how multiple number series are to be set up for a single field in NAV. The number series has to be setup dynamically on Assist-Edit of the page. Pre-requisite: NAV 2017 Demonstration: 1. Create a No. Series : Create a number series in the No.Series and then create a relationship. 2. Create a field in Sales & Receivable Setup which has relation No. Series Table: 3. On the Card Page Enable the AssistEdit property for that field. On the Assist Edit Trigger add a function call and Update the current page: This function checks whether the field No.Series is present in the Sales & Receivables Setup and then runs the No.Series via RUNMODAL using SelectSeries and selects the current series using SetSeries function. 4. Result: Conclusion: Thus, by this method, multiple customized No. Series can be added to a single field.