Category Archives: Dynamics 365
Model import and export in D365 Finance and Operations using Powershell
When we want to move customization done on specific model from one environment to other development environment we need to export and import the model file. Steps for model import and export using PowerShell :- Open PowerShell in administrator mode. Change directory to the path of package bin folder. Export command:-.\ModelUtil.exe -export -metadatastorepath=C:\AOSService\PackagesLocalDirectory -modelname=”name of model” -outputpath=path to store model after exportFor example: If model name is TOUpgradeModel and I want to store the model file to path is C:\Temp\ModelFile The command will be as follows: .\ModelUtil.exe -export -metadatastorepath=K:\AosService\PackagesLocalDirectory -modelname=”TOUpgradeModel” -outputpath=C:\Temp\ModelFile Output file you can see on the specified path as Import Command :-.\ModelUtil.exe -import -metadatastorepath=C:\AOSService\PackagesLocalDirectory -file=the path from. axmodel to importFor example: .\ModelUtil.exe -import -metadatastorepath=C:\AOSService\PackagesLocalDirectory -file=C:\Temp\ModelFile\TOUpgradeModel-Cloudfront.axmodel ( Note : If model already exist in your environment, trying to import the same model you will receive the error message of “Model already exist”. So, delete the existing model by command .\ModelUtil.exe -delete -metadatastorepath=C:\AOSService\PackagesLocalDirectory -modelname=” TOUpgradeModel ” try to import the model)
Share Story :
How to run your SSRS Report for Past “N” Days from the Report run Date
Introduction If have a parameter on our report to see the past “N” days data on our report, we can perform the following steps. Step 1: Add a new Parameter, say “Days” Step 2: Under the Available Values Section, Add a new Value for the Parameter with value as 7 and expression having the following formula: =DateAdd(“d”,-7,Globals!ExecutionTime) Step 3: Under the Default Values Section, Add a new Value for the Parameter with expression having the following formula: =DateAdd(“d”,-7,Globals!ExecutionTime) Step 3: In your Dataset, add the following Filter Condition in the XML. <filter type=”and”> <condition attribute =”modifiedon” operator=”on-or-after” value=”@Days” /> </filter> Conclusion Thus, now you can view your report with records modified in the past “N” days.
Share Story :
D365 General Tip: Currency field affects PriceList field
In a hurry, you perhaps selected a similar looking Price List on your Quote and you want to change it. Example: By mistake, I have selected “SalesPriceListINR” and want to select “SalesPriceListUS” But when you try to do this, you can’t see the PriceList you want to set. Why is that? Currency That’s because the Currency selected on the record is Rupee (₹) and your PriceList has the currency US Dollar ($) Change it to US Dollar and you’ll see your PriceLists show up. And try searching your Price Lists again Error while changing PriceList In a typical scenario, if you have child records dependent on the record you are changing, you’ll see this error. But as simple as the wordings are, you’ll need to do the needful and make sure there are no Currency dependent records associated. Hope this helps!
Share Story :
Suggest Vendor Payments feature in Payment Journal – NAV/ Business Central
Introduction: In this blog, I will be attempting to highlight on Suggest Vendor Payment functionality in Payment Journals. Pre-requisites: Microsoft Dynamics Business Central Microsoft Dynamics NAV Demonstration: Last Payment Date: This date is the latest date which can be appeared on Vendor Ledger Entries for making the Payment. Entries that have Due Date or Discount Date before the Last Payment Date will be included in Suggest functionality. Last Payment Date Find Payment Discounts: Find all the Payments which will have discounts. If this field is TRUE then Suggest Vendor Payment functionality will include Payments with Discounts as well as Payments without Discounts. Find Payment Discounts Use Vendor Priority: While making payments, if you want to prepare the entries priority wise, then you will need to set the priority of Vendor under the Payments section. Use Vendor Priority Priority field in Payment Section in Vendor Card By default, the priority is set to 0. If Vendor priority is not set which means that the Vendor Payments are to be processed in Alphabetically FCFS fashion. Available Amount: If the Available Amount is filled in which means that the maximum amount for the payments will be considered. Available Amount Skip Exported Payments: This boolean is used to skip those payments for which the Payment EFT file has been exported. This is generally used where the Payments are not supposed to be posted but the new payments are to be included in the list. Skip Exported Payments Check Other Journal Batches: This boolean field is used to skip all those payments which have already been included in the different General Journal Batches. This will avoid including duplicate payments. Check Other Journal Batches Summarize Per Vendor: This will make a single Payment per Vendor which will be applied to multiple documents. Also, this boolean will create separate payment entries for payments with different currencies. This feature cannot be used in conjunction with ‘Calculate Posting Date from Applied Entries‘ Summarize per Vendor By Dimension: This will create the entries for which the applied document will have the correct dimension. By Dimension Posting Date: Sets the Posting Date for the General Journal Lines. Posting Date is generally set to today’s date or date after the late payment date. Posting Date Calculate Posting Date from Applied Entries: Sets the Posting Date from Applied Entries based upon the Due Date of the Applied Document. Calculate Posting Date from Application Starting Document No.: Starting No. Series for the Payment Journal. This value will be set to Next No. after current Payment Journal Lines have been created in Payment Journal. This field is generally auto-filled. Starting Document No. New Doc No. per Line: This is used to create a separate Document No. for a separate entry line. When this is set to false, automatically a single Document No. is used for multiple entries of a single Vendor. New Doc. No. per Line Balance Account Type: Balance account type can be a G/L Account or Bank. Bal. Account Type Bank Account No. Used to generate only payments from a specific Bank Account. Vendor Filters: Vendor Filters are basically used to get only those payments related to a particular Vendor. Vendor Filters Conclusion: Thus, Suggest Vendor Payments can be a pretty good tool to deal with Payments where you don’t have to manually go and reconcile for the Vendor Purchase Invoices. There are a lot of variants to get the pending Payments with a lot of filters in Suggested Vendor Payments.
Share Story :
How to resolve Error “Exception from HRESULT: 0xC0202009” While data export
While Exporting data using data entity in D365 FO sometimes the Data project fails to export data with error “Exception from HRESULT: 0xC0202009”. While event log displays – EventData methodName DMFGenerateSSISPackage.generateFileDataV2() diagnosticsMessage System.Exception: Exception from HRESULT: 0xC0202009 at Microsoft.Dynamics.AX.Framework.Tools.DMF.ServiceProxy.DmfEntitySharedTypesProxy.DoWork[T](Func`1 work) at Dynamics.AX.Application.DMFGenerateSSISPackage.`generateFileDataV2(DMFDefinitionGroupExecution _dmfDefinitionGroupExecution, String _defGroupName, DMFFileFormat _fileFormat, DMFDelimiter _rowDelimiter, DMFDelimiter _columnDelimiter, String _codePage, String _locale, NoYes _isFirstRowHeader, NoYes _unicode, String _source, String _textQualifier, DMFXMLStyle _style, String _rootElement, String _filePath, Map _entitySyncVersion, Int32 _previewCount, Boolean @_entitySyncVersion_IsDefaultSet, Boolean @_previewCount_IsDefaultSet) in xppSource://Source/ApplicationFoundation\AxClass_DMFGenerateSSISPackage.xpp:line 1273 In Such Cases, the reason behind this is some target fields is may be disabled or cause this problem. To resolve this problem, you need to perform the following steps :- Refresh Entity List Data Management>>Framework parameters>>Entity Setting And wait until all entities got refreshed Regenerate Mapping – Select data entity with the above issue (In our case Sales Order header v2 Entity)from data entities in data management. Click on Generate Mapping – Select “Yes” from generation warning Note:-You can try to disable/remove fields from the mapping until it starts working. This way you at least find out the problematic field. To be more effective, disable the first half of the field list. If the export works, the problem was in some of the disabled fields. I hope this will help you.
Share Story :
Numpad to remain on-screen in POS inventory receiving form in Dynamics 365 For Retail
This functionality was available in point of sale (POS) in Retail version 7.2. This functionality allowed for the numeric keypad (numpad) to appear at all times on the product receiving form. Having the numpad always available helps improve the efficiency of scanning product barcodes as part of POS receiving. This feature was removed after Retail version 7.3 due to screen redesign, but it has been brought back in all new releases. This functionality is enabled by default. You can access it from Picking and Receiving button on POS. Click on New button and the Numpad should open. Hope this helps !
Share Story :
Entity Relationship Behavior in D365 CRM
Problem Statement: When a user changes the owner of Lead (either because the original owner has left the company or the lead is being assigned to a new salesperson), the system changes the owner on COMPLETED activities to the new owner of the record. This is a problem because it is important that we maintain the history as to who performed each task that happened in the past and by switching the owner for completed tasks this changes all historical reporting and records. Solution: This kind of situation can be easily handled by using the relationship behavior feature in D365 CRM. Create a new solution->> add the Activity Entity for which you need to make this change. (in below example I have added the Email entity). When you open the relationship, you will notice that the behavior is set to Parental. Parental Relationship: In this relationship all changes on parent record are reflected on child record. Change the type of Behavior to Configurable Cascading. This will enable the Assign\Share\Unshare\Reparent actions which were earlier set to Cascade All as the relationship was Parental. 4. For our problem Statement where we will be making changes to owner, we will be using changing the Assign Action. Below are scenarios handled by Assign Action in relationship feature (On Change of owner) Scenario 1:Cascade-None: No change will be done to existing Activities and Notes. No change on Child will be done if Change in Parent. Scenario 2:Cascade-Active: Only Open Activities will be updated to the new owner and date changed to date of change of owner. This option is not available for Notes, as notes are always active. Scenario 3:Cascade-All: Changes on the parent will be done on the Child. Scenario 4:Cascade-User-Owned: Changes on parent will be reflected on child records owned by the same user. As for our requirement, we will make it cascade active(Scenario 2) Below is an example for the same. a. Before Change of Owner, we can view the last updated Datetime of activity.b. After Change of Owner, we can view the last updated datetime of activity. As desired, The Date-time and owner is updated for open activity. (Since I have tried all the cascade options on the same Date, in my example you will be able to see change of time and not Date). Conclusion: By using the relationship behavior feature, we can maintain historical data even on changes done to parent record (change of Owner).
Share Story :
How to create a Gantt Chart or Progress bar inside a Table in SSRS
In this article, we will create a Gantt Chart or Progress bar inside a table in SSRS . In SQL Server Reporting Service does not allow a report programmer to modify a “width” property at run time. The challenging part of this task is how to create a scale and how to create a progress bar that spans a start date and end date. But SSRS have a range bar chart that will help you to make a Gantt chart or progress bar. And display diamond shape if start date and end date is same. For creating Gantt chart, we need a Data source, a Dataset, a Table and a Range Bar chart. Steps Step 1: First create a new data source. Step 2: Before creating a data set, we need to write a Fetch XML query that created the data we’re going to work with. Fetch XML Query: <fetch version=”1.0″ output-format=”xml-platform” mapping=”logical” distinct=”false”> <entity name=”milestone”> <attribute name=”createdon” /> <attribute name=”item” /> <attribute name=”projectid” /> <attribute name=”contractorid” /> <attribute name=”packageid” /> <attribute name=”startdatemilestone” /> <attribute name=”remarks” /> <attribute name=”finishdatemilestone” /> <attribute name=”startdateforecast” /> <attribute name=”finishdateforecast” /> <attribute name=”startdateactual” /> <attribute name=”finishdateactual” /> <attribute name=”progress” /> <attribute name=”status” /> <attribute name=”durationdays” /> <attribute name=”sequencenumber” /> <attribute name=”milestoneid” /> <order attribute=”item” descending=”false” /> <filter type=”and”> <condition attribute=”projectid” operator=”eq” uiname=”ABC” uitype=”pmtracker” value=”{86AF05D9-6962-E911-A834-000D3A07F3D7}” /> </filter> </entity> </fetch> This gives us a result set like this : Sequence Number Item Package Start Date(Milestone) Finish Date(Milestone) Start Date(Forecast) Finish Date(Forecast) Start Date(Actual) Finish Date(Actual) Duration(Days) Status 1 Concept Design Lighting 02-01-2019 06-02-2019 03-01-2019 09-02-2019 03-01-2019 09-02-2019 37.00 Completed 2 Concept Design approval Lighting 13-02-2019 13-02-2019 07-02-2019 14-02-2019 07-02-2019 13-02-2019 6.00 Completed 3 Detail Design Lighting 14-02-2019 17-04-2019 14-02-2019 17-02-2019 14-02-2019 18-02-2019 4.00 Completed 4 Detail Design Approval Lighting 17-04-2019 23-04-2019 17-04-2019 24-04-2019 17-04-2019 22-04-2019 Delay 5 Tender Issue Lighting 29-05-2019 31-05-2019 01-06-2019 03-06-2019 01-06-2019 03-06-2019 Delay 6 Tender Return Lighting 31-05-2019 22-06-2019 03-06-2019 03-06-2019 03-06-2019 24-06-2019 21.00 Completed Step 3: Now we create a Data set from this query: If start date and end date is same then need to display diamond shape, for that we have to add three calculated field. Need to find number of days between two dates. DayDiff_MileStone=DateDiff(“d”,Fields!startdatemilestoneValue.Value,Fields!finishdatemilestoneValue.Value) we are going to set the following properties: We’re going to create a table within the report that has a column for each of the columns in the data set, plus a column for a graph. We just have to bind the Table to the data set “MilstoneData” Then drag the columns of the data set to the columns of the table. Step 4 : Build the Gantt Chart SSRS have the Range Bar Chart option. Just drop the chart onto a blank area of the report. We’ll fit it into table later. Now we are going to take fewer part of the chart. We’re throw away of: The chart title The legend The vertical Axis title The vertical axis The horizontal axis title When we’re done, the chart should look like this: Let’s start setting up the chart. The first thing we need to do is set the Minimums, Maximums, Intervals and Interval Types. The client wants minimum date must be from “startdatemilestone” date and maximum date should be “finishdateforecast” date. On the Horizontal Axis, we are going to set the following properties: Minimum =DateSerial(Year(Min(Fields!startdatemilestoneValue.Value, “MilestoneData”)), Month(Min(Fields!startdatemilestoneValue.Value, “MilestoneData”)), -1) Maximum =DateSerial(Year(Max(Fields!finishdateforecastValue.Value, “MilestoneData”)), Month(Max(Fields!finishdateforecastValue.Value, “MilestoneData”)) , 0) Interval 1 Interval Type Months Also going to set the format the of items along the Horizontal Axis to MM-yyyy Go to chart series properties, set Marker properties. Let’s get a preview of the report and see how we’re doing. It’s correct, but it doesn’t provide the milestone data. Now cut the chart and paste it into the details row of the Table, in the right most column. Now we’re going to run a preview. OOPS! We receive the error “The chart has a detail member with inner members. Detail members can only contain static members. What this means is that chart cannot live in a detail row. We’re going to create a Group that contains only a single Item. After selecting the Table, at the bottom left of the screen, we find “Row Groups”, Just click on preview shows us: Nice-looking but do we really need a timeline on every now? Now we are going to need a timeline. So, let’s take a copy of the Chart and put it right next to the header “Duration” Now we can hide the Axis Labels on the chart in the footer. We can also change the Axis line style to none. Click on preview Wow! Hope this helps you! Check out my other blog here https://www.cloudfronts.com/performing-update-operation-in-microsoft-dynamics-nav-through-integration-in-scribe-online/
Share Story :
How to Attach Word Template to Notes of record Automatically
Introduction: In this blog, we will look into How to Create Word Template Automatically and attach it to Notes. Steps to attach Word Template Using Workflow Navigate to Solution > Processes > Click on New > Enter your Process name, Select Workflow as your Category, Enter your Entity (Account), Check the button (Run this Workflow in the background) > Click on OK I have created a Custom Field as Status. I want this workflow to run when this field is updated, So Check the Record fields change > Select the Status Field State the condition on which you want to trigger the workflow. Select Perform action > Select Action(Set Word Template) > Click on Set Properties Select your Word Template in “SelectedTemplate” and in Target select the “Entity”. If you cannot set Entity Name in “Target” make sure “Business process flows” properties of that entity is enabled. Save the Word Template Activate the Workflow. Output: Update the Status field Automatically the Note is created with word template
Share Story :
Notes attachments in Word Template
Introduction : This blog explains how to add notes attachments in word template. Implementation : Let say we have word template on the account entity and we want to add attached notes in word template. Step 1: a. Create record( if no record is there) for an account entity. b. Select the record and download the word template. Step 2 : Select notes- annotation(1:N) relationship and Download. Step 3 : Open Word Template, Navigate to “Developer” ->Select “XML Mapping Pane” -> Select entity . Step 4 : Then insert a table in the template , here inserting 2×1 table. and then in the XML mapping, go to Account_Annotation relation. Step 5: Map document body and note text a. For text in word template, left-click on the note text and select plain text. b.For the image in word template, left click on the document body and select Picture. Step 6 : Save and Upload the Template. To upload the Template – a. Go to advanced settings -> navigate to “Template”. b. In Templates, Select Document Template. c. In Document Template, click on Upload Template and browse. d. Upload.