Category Archives: Dynamics 365
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.
Share Story :
10 Best Practices for implementing HTML web resources with Dynamics 365 CRM
Do not use any CDN links for any .js or .css file, include them in your own project. Do not give multiple references of any .js or .css file on the same HTML. If any .js or .css file is going to be used on multiple Html web resources, then keep them at one common location and include the same URL reference on all the HTML page, do not try to create same web resources repeatedly. Always try to write minimum codes and re-use the code where possible. Always try to use objects where possible. Minimize the use of global variables (use local variables). Avoid multiple API hits try to get maximum data in a single hit where possible. Use joins in fetch XML queries to get data from all the related entity to avoid multiple API hits. Use Try and catch for exception handling. Minify .js and .css file before releasing the same on production.
Share Story :
Set Lookups in Xrm.WebApi D365 v9 correctly
Using Xrm.WebApi needs you to be careful with the field names and what to use when. Especially, when you are dealing with Lookups. One of the most common errors you’ll come across is the one like below – “An undeclared property (fieldname you entered) which only has property annotations in the payload but no property value was found in the payload.” This is confusing as to what needs to be put in while setting the lookup. If you have done the below, entered the name of the field which is all in small caps – object[“msdyn_resourcerequirement@odata.bind”] = “/msdyn_resourcerequirements(<Guid>)”; This will result in the above error!!! You’ll need to put the Schema name of the lookup field instead and this should solve your problem – and the code should look like this – object[“msdyn_ResourceRequirement@odata.bind”] = “/msdyn_resourcerequirements(<Guid>)”; And this should totally work for you!! Hope this helps! 🙂
Share Story :
How to make same record available in two different Organization / Environment? Part 1
Why it is required? Let’s discuss the scenario where we will be required to have some records in the Multiple Environment. Let’s say we have workflow or flow which is configured or running with specific records. So, if we move the flow or workflow to another organization or Instance so the same record is not available with the same GUID. To run the flow or workflow we must change the flow or workflow. Now if we have 10 – 20 flow / Workflow like the same, then it will be so much time consuming So, the best solution to have the Same records with the same GUID in multiple instances. Prerequisite: The system must have the same entity and fields present in both the system in which you must transfer records. Because it will through an error while import to destination Environment Solution: Exporting Phase: Login to Source Environment from where you want to export the Data. Open the Entity of which data needs to be migrated. You can see I have an Entity called Customer which is having a few numbers of records present in the system. Now You need to export the Data from the source Environment. Export Data from the advance find or direct from the View. After Exporting the Data from the system, an excel file will be downloaded with the same columns as in the views. Now, open the exported Data file. The following is the screenshot of the file. You can see there will hidden Columns in Excel A, B, and C. Now to Unhide the Hidden Columns, select all Data Or Press Ctrl + A and Go to Format in Home Section > Under the Visibility Section Click on Hide & Unhide > Unhide Columns. Please see the following Screenshot for more reference. Now You can see all the three Columns as (Do Not Modify) Entity Name, (Do Not Modify) Row Checksum & (Do Not Modify) Modified On. You can see the Hidden Column in the screenshot after unhiding. Let’s move forward now, we must delete (Do Not Modify) Row Checksum & (Do Not Modify) Modified on Columns because we are not required those columns while importing to another environment. If we will import with those columns it will through the error while import Operation. Change the Header from (Do not Modify) Entity_name to Entity_name for convenience while mapping during importing and Save as CSV. Now Your File is ready to import in another system. Let’s go towards the importing phase.
Share Story :
Display D365 Plugin Error on D365 Portals.
Introduction It is important for the end-user to understand the error displayed on D365 Portals. In this blog, we will display D365 Plugin Error on the D365 Portals. By default, the error will be displayed as shown below: Implementation Step 1: Create a new Site Setting record. Step 2: Set the values given below in the fields: Name: Site/EnableCustomPluginError Value: true Now you can see the Error thrown by D365 Plugin. Custom plugin errors will appear on the following screens: Entity list Retrieval of records Entity form Retrieve Create/Update and so on Web forms Retrieve Create/Update and so on
Share Story :
[SOLVED] “The Operation has Timed out” in D365 Portals.
Introduction In this blog, we will resolve “Operation has timed out” error in D365 Portals. Steps to solve this issue: Restart your portal by going to the admin center. Steps to restart the portal: Go to the Dynamics 365 Administration Center page and select the Applications tab. Select the name of the portal, and then select Manage. Click on Portal Actions –>Restart. Click on Restart. Wait for a few minutes and go back to your portal, it should be working now. Reference: https://docs.microsoft.com/en-us/dynamics365/portals/portal-faq
Share Story :
Disable Recently Used Items in Lookup of D365 CRM
Introduction: This blog details steps on how to disable most recently used items in Lookup of D365 CRM. Scenario: Enabling prefiltering on “Reported By Contact” Lookup by Service Account in Work Order Form of D365 Field Service however it shows records which are not filtered. Developers assume prefiltering is not working however it shows most recently used items also. This feature was released in version 9.1.0.3452 and it can be disabled by following the below steps. Step: Navigate to the form editor and open the lookup field’s properties dialog. The checkbox should be enabled for option “Disable most recently used items for this field” below is screenshot for reference. Below is screenshot after publishing the form and Contacts are shown as expected. Conclusion: Hope this blog helps you resolve the issue for disabling most recent items in lookup of D365 CRM.