Category Archives: D365 Customer Service
Connect D365 CRM CDS Database from SQL Server
Many times, we feel like why I can’t access D365 CRM Database directly from MS SQL Server, so here is my blog that will guide you on how you can connect D365 CRM CDS Database using MS SQL Server Steps to enable D365 CRM CDS Database to make it connect from MS SQL Server: Login to https://admin.powerplatform.microsoft.com/ using administrator credentials. In Environment section, click on your environment for which you want to enable D365 CRM CDS for MS SQL Server. (In my case I am clicking on DemoEnvironment as shown below.) When Environment opens click on settings in header. Settings page will open, Click on Product and then click on Features. When features Page opens enable TDS Endpoint (Preview) and click save. Now, we have successfully enabled D365 CRM CDS to connect it from MS SQL Server. Steps to Connect CDS Database from MS SQL Server: Open MS SQL Server. In connect to SQL Server Window enter Server name (It will be your D365 CRM URL) followed by comma and Port Number (5558) e.g. of server name yourdomain.crm.dynamics.com,5558. Select Authentication as Azure Active Directory – Password. Enter Username: Your admin user id e.g. admin@xyz.com Enter Password: (Your Login password) ******** Click Connect. Now, you have successfully connected to D365 CRM DB. Write a select query and test if it’s working.
Share Story :
Set Name Format In D365 CRM
Introduction: In some scenarios, we might need that Full name of Contact Person should be Last Name and then First Name. In this blog we will see how to change the Format of Full Name for Contact Entity. Step 1: Go to Advanced settings -> Administration -> System settings Step 2: Open System settings -> you will see Option to select different Name format -> Select Format you want and click OK. Step 3: here is the short Demo: I have created a Contact with First Name as Jon and last Name as Paul Below is the Output: Note : This can not be exported into Solution. I hope this blog will help you to format Contact’s Name
Share Story :
Required Privilege for Canvas App in D365 CRM
Introduction This blog explains how to resolve the issue for Canvas App not loading which is embedded in D365 CRM using HTML Webresource. Issue After Canvas App was published and shared with Users still, they were unable to access the Power App. It was showing a blank page with no error. Resolution After debugging the Webpage, I concluded it was missing the Canvas App required privilege. The privilege can be found in D365 CRM as per below screenshot After creating a new role for sharing Canvas App and assigning to User, Canvas App rendered as below Conclusion I hope the above Blog helps you resolve the issue for Canvas App embedded using HTML Webresource in D365 CRM. Note: This privilege is only required for Canvas App embedded with HTML Webresource in D365 CRM.
Share Story :
Convert Your Complex Workflow to Power Automate with Two Easy Steps
While creating a new Background Workflow, we all have noticed the below message. Microsoft Flow( Power Automate) is a growing platform with a variety of new connectors getting added overtime. However, we all are aware that Workflows have a great capability when it came to including steps like Call Plugins, Workflow Assembly. And thus, when we think of replacing our existing background Workflows with Microsoft Flows, we might worry about losing our existing Plugin Customizations used in Workflow. So, here are a few easy steps to use all the existing Workflow steps in your Power Automate( Microsoft flow). Step 1: Create an Action. Lets take an Example: We had a workflow which triggered on When a Note was created and had the below steps: The first step Notes Collection, was Workflow assembly that was customized to send history all notes in a Tabular Format, and was something we wanted to use in Power Automate and so we created the below Action. The Action has the exact same steps as that of the Workflow. Step 2: Create a Flow with a trigger same as your Workflow trigger and call the action. Once we have created the Action, our goal is to deactivate the Workflow, and call the Action from our power Automate. To do so, we will add the below step: This step is in the Common Data Service(current environment) Connector. Since we have action that belongs to Entity Note, we will create bound action. If we have a global action, which needs no identifier we can add the step- Perform an unbound Action. Conclusion: Any Workflow that runs in background and uses Plugins or steps that you would prefer not to change but to use them directly in your Power Automate, then here’s an easy way.
Share Story :
Resolve the dependency between multiple solutions in D365 Customer Engagement / CRM Solution using Solution Component Mover.
You have might question in your mind that why we need to move the components from one solution to another solution in D365 Customer Engagement So, let’s consider a scenario you and your team is working on D365 CRM customization and created the two solution — ‘ Solution A’ and ‘Solution B’. While customization development when you are moving the ‘Solution A’ on the Production instance but you are not able to move it. Because some of the missing components are present in the ‘Solution B’. Then you have decided to move the ‘Solution B’ first, but again while moving the ‘Solution B’ its failed because of some of the missing components present in ‘Solution A’. It means ‘Solution A’ and ‘Solution B’ are dependent on each other and you can’t move either of the solutions in the Production Environment or Target Environment. There are two solutions to the above problem Add the missing components in the one solution and move that solution to production. Merge the dependent solution into one solution using Solution Component Mover. Now, the First solution is time-consuming as well as effort making and developers need to track all the missing components and add them manually. But using Solution Component Mover, you can merge solutions in 10 to 15 min just by selecting the component from Source Solution and Target solution to which you need to move the components. So, let us see how to do it. Perquisites: XrmToolBox You can download the XrmToolBox from https://www.xrmtoolbox.com/ Steps to follow: Open the XrmToolBox and connect to your D365 CRM environment. Search for the Plugin “Solution Components Mover” Image: Search Solution Components Mover in XrmToolBox 3. Once the plugin will be load, click on load solution — it will load all the solutions present in the Environment. Image: Click on Load Solution After solutions are loaded you can see I have two solutions in my Environment “Solution A” and “Solution B” which have dependent components and one “Target Solution” on which I m going to copy the component so that “Target Solution” will become a master solution. Solution A Image: Solution A has Account entity and it’s subcomponents Solution B Image: Solution A has Case entity and it’s subcomponents Target Solution Image: Target Solution doesn’t have any entity or component. 4. Move the solution component by select the Source solution and Target Solution 5. Click on the Copy component, a popup will open where you can select the component type to move to the target solution. 6. Click on “Ok” and component from both solutions will be moved to Target Solution. You can see the following screenshot in which Target Solution has a component from “Solution A” and “Solution B”. You can see XrmToolBox Plugin how it helps to reduce your time and effort to which are required to move the component from solution to solution manually one by one.
Share Story :
Customize Opportunity Close Dialogue Box
Go to Admin settings. Click on system settings After clicking on System settings, a popup opens, click sales tab as shown below. Select Yes in Customize close opportunity form and click ok, refer below image.
Share Story :
Choose which All Records To Create While Qualifying Lead
Go to Admin settings Click on system setting After clicking on System settings, a popup opens, click sales tab as shown below. Now, select no for Qualified lead experience refer below image.
Share Story :
Share Records in D365 CRM by Code
Introduction: This blog details steps how to share entity record in D365 CRM by Code. Scenario: We have client requirement to share record with multiple set of Users in D365 CRM based on criteria selected by User on Form and needed to be automated. Implementation Step: Below code to be developed for OnCreate of record. Create new method ShareRecords private static void ShareRecords(IOrganizationService service, Entity entity, Entity segmentUser) { var CreatedReference = new EntityReference(“systemuser”, segmentUser.Id); var grantAccessRequest = new GrantAccessRequest { PrincipalAccess = new PrincipalAccess { AccessMask = AccessRights.ReadAccess | AccessRights.WriteAccess | AccessRights.AppendToAccess, Principal = CreatedReference }, Target = new EntityReference(entity.LogicalName, entity.Id) }; service.Execute(grantAccessRequest); } Retrieve User List of Users and execute ShareRecords method EntityCollection segmentUsers = service.RetrieveMultiple(new FetchExpression(fetchXMLUsers)); foreach(Entity segmentUser in segmentUsers.Entities) { ShareRecords(service, entity, segmentUser); } Below code to be developed for OnUpdate of record. Create new method UnShareRecords private static void UnShareRecords(IOrganizationService service, Entity entity, Entity segmentUser) { var CreatedReference = new EntityReference(“systemuser”, segmentUser.Id); var revokeUserAccessReq = new RevokeAccessRequest { Revokee = CreatedReference, Target = entity.ToEntityReference() }; service.Execute(revokeUserAccessReq); } Retrieve existing shared Users and remove there Access private static void RetrieveSharedUsers(IOrganizationService service, EntityReference entityRef) { var accessRequest = new RetrieveSharedPrincipalsAndAccessRequest { Target = entityRef }; var accessResponse = (RetrieveSharedPrincipalsAndAccessResponse) service.Execute(accessRequest); foreach(PrincipalAccess principalAccess in accessResponse.PrincipalAccesses) { EntityReference prAcc = principalAccess.Principal; Entity entity = new Entity(entityRef.LogicalName, entityRef.Id); Entity segmentUser = new Entity(prAcc.LogicalName, prAcc.Id); UnShareRecords(service, entity, segmentUser); } } Implement code for ShareRecords explained in step 1 & step 2. Conclusion: Hope this blog helps you to to share and unshare records by code in D365 CRM based on custom criteria data on record dynamically.
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 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.
