Category Archives: Dynamics 365
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.
Share Story :
How to Replicate D365 View using XRM Tool
Introduction: In this blog we will look into How to Replicate your View to all the Views Steps: Navigate to Solution > Expand the Entity (Account) > Views > Click on Quick Find Active Account Click On Add View Columns3. You can Add fields for the view based on what you want to view.4. You can modify the width by clicking on the column name and then click Change Column Properties. Choose the quantity of pixels you’d just like the width of the column to seem as in the view.5. Click on Save And Close and then Publish your Customization Replicate View to all other Views Together To Copy the views Start Your XRM toolbox > Connect to your organization. Search View Layout Replicator Click on Load Entities > Click on your Entity (Account) > Click on Quick Find Active Accounts. Check all your customization’s are correct, Then select all the views which you want to get reflected Save and Publish your View
Share Story :
How to make same record available in two different Organization / Environment? Part 2
Please refer to my previous blog better understand why the same records are required in two different Organizations or Environments. Click Here Import Phase: Login to Destination Environment in which you want to import the Data with the same GUID. In Destination Environment, Open the Entity View and click on right three dots for import options. Click on the > which is present on the right side of “Import from Excel” Click on the Import from CSV You will get the Screen like shown in below Screen and now you have to select the file and click on Next You will get the Screen as shown in the below Screenshot. Now, click on the Review mapping. After Clicking on the Review Mapping you must map the column header to fields of Entity. Now, here comes the most important of this blog. Here you have a map the column which has the GUID of the entity to Entity name present in the Destination Environment. Here I have mapped Customer Header (having GUID) to Customer (Entity Name). You can ignore the mapping of “Created On” Date or else you can map it will “Record Created On”. Click on the Finish Import and see the magic. All the Data will be imported with the same GUID as of source Environment. You can see the imported data in the following screenshot. To check whether the GUID of records present on both the Environment is the same or not. Just export data from both the Environment and match the GUID of each record. Below you can see the GUID of imported and exported records are the same. Following is exported Data from Source Environment. Following is exported Data from Destination Environment.
Share Story :
How to use System.Text.Json APIs in Asp.net
Initially for parsing object to Json or json to object in Asp.net an additional Newtonsoft.Json Api was required, but now Microsoft has developed their own Apis “System.Test.Json”. Below Steps will guide you on how to use this api. Install the System.Text.Json NuGet package. To use the api make sure you import the following two namespaces: using System.Text.Json; using System.Text.Json.Serialization; Using the serializer as follows: The System.Text.Json serializer can read and write JSON asynchronously and is optimized for UTF-8 text, making it ideal for REST API and back-end applications. class WeatherForecast { public DateTimeOffset Date {get; set;} public int TemperatureC {get; set;} public string Summary {get; set;} } string Serialize (WeatherForecast value) { return JsonSerializer.ToString<WeatherForecast>(value); } Api also support asynchronous serialization and deserialization. async Task SerializeAsync(WeatherForecast value, Stream stream) { await JsonSerializer.WriteAsync<WeatherForecast> (value, stream); } You can also use custom attributes to control serialization behavior, for example, ignoring properties and specifying the name of the property in the JSON: class WeatherForecast { public DateTimeOffset Date {get; set;} // Always in Celsius. [JsonPropertyName(“temp”)] public int TemperatureC {get; set;} public string Summary {get; set;} // Don’t serialize this property. [JsonIgnore] public bool IsHot => TemperatureC >= 30; } Note: In the above point isHot property will not get parsed to json and json will look like below: { “date”: “2013-01-07T00:00:00Z”, “temp”: 23, }
Share Story :
How to integrate OneDrive for Business with Dynamics 365
Most of the organization are using the built-in integration between Dynamics 365 and SharePoint, which allows the organization to manage and store documents in SharePoint. Microsoft has expanded the document management capabilities for Dynamics 365 with the built-in integration of Dynamics 365 with OneDrive for Business. With this integration, users can manage the documents for the D365 CE entities from their OneDrive for Business. In this article, we are going to see how to enable Dynamics 365 integration with OneDrive for Business. IT Considerations: No additional software required. You need to have the System Administration role in Dynamics 365 to enable OneDrive for Business integration with D365. Users must have a SharePoint Online license. Enabling D365 integration with OneDrive for Business: Go to Settings > Document Management > Enable OneDrive for Business. Tick on Enable OneDrive for Business and click OK. After enabling OneDrive for Business, you can see OneDrive for Business Folder Settings, in which you can define the folder which will be used for storing the Dynamics 365 documents in your OneDrive for Business. You can see the default folder as /CRM. Go to Dynamics 365 records > Related > Documents. In the Document Location, you will see two folders appeared. OneDrive – From here you can save the document in OneDrive CRM Shared with me – Files shared with you for the associated record will be shown here. Using OneDrive for Business for Dynamics 365 Entities: Once you are in the Document Location of a record, you can create or upload the document in OneDrive. You will need to first select OneDrive in Document Location. In this case, I am uploading a document to OneDrive for an Opportunity. When I select All locations, I will be able to see all the documents associated with this record. The above-uploaded document has now been associated with this Opportunity. Here is how the folder gets created in your OneDrive for Business. The folder structure will be like CRM > Opportunity > Record. Now, let’s see if the other user can access the OneDrive document I uploaded for the record. I went to the same record and selected All locations. So, the user is only able to see the files on SharePoint. Let’s try to share this file with the user and see if it is accessible after sharing. When the file was shared with other users, the document is now visible under Shared with me a folder or under All locations in the D365 record. You can check the source; it says Shared with Me. This is how we can integrate Dynamics 365 CE with OneDrive for Business and can associate their documents with D365 for Customer Engagement records which any other individual will not be able to see unless the file is shared.
