Category Archives: D365 General
Access Teams
Introduction: In this blog, I will be giving an overview about access teams and a quick demonstration of the same. Brief Description : Access teams provides a way to share records between different functional teams without having to change or update the base security rule in Security roles. Access teams does not mean ownership of the record. The record is only shared so that other users can work on it. Scenario: There are two sales teams “Sales India” and “Sales US” in different business units.The users of both the teams can read the whole organizations data but can write/edit data to only those users data who are in the same business unit.Here if one team member of “Sales US” wants to write/edit a record of “Sales India” it is not possible. This is where access teams comes in the picture. Some users from “Sales US” can be given access to write/edit records of “Sales India” Steps: Step 1: There are two business units “Sales India” and “Sales US” Step 2: Tom is a part of “Sales India Team” and Harry is a part of “Sales US Team”. Step 3: Assigned both the users a custom role in which they can do the following as shown below: Read account records of the whole organization Create records at user level Write/edit records at business unit level Step 4: Now to enable access team we must navigate to entity for which access teams needs to be enabled as shown in figure below Here we go to Accounts entity and enable Access Teams then to save the changes made publish all the customization. Step 5: To use access teams we first create an access team template by navigating to Setting > Security > Access Team Templates Step 6: Here create a new template with an appropriate name and select the Access Rights and the Entity as shown in the figure below. Note:The entities field on which Acess Teams are enabled only those entities will be shown in the Entity field dropdown. By adding users, you are granting them the access rights to that record that are defined within the access team template, even if their base security role does NOT grant them those rights. Note, the access rights are ONLY being granted for that specific record. Step 7: Now we add a Sub grid on the Accounts main form so that the users can be added to the access team on the fly. Here in the Team Template field select the template made for the access team. After setting up the subgrid Save and Publish all the Customizations. Step 8: Harry is the owner of two records(Crook Motor Company & Lamborghini) as shown below. Tom is the owner of one record(Tata Motors) as shown below Step 9: Harry can view every record in the organization but cannot write/edit. As seen below harry can only read record created by Tom. Step 10: Now as harry wants to write/edit this particular record, the admin has to add him in the access team sub-grid to give him access to write to this record. Step 11: Now Harry can write/edit to that particular record as shown below. Conclusion: Using this technique we can easily make different user access teams and assign specific records to work on without having to deal with their base security roles.
Share Story :
Decompiling the code from the plugin dlls
Introduction: There can be a possibility that we lost our plugin code and dlls are already present in Dynamics CRM and we want to extract the code from Dynamic CRM. We don’t have a code backup and we are supposed to make changes in the code as we have some errors in plugin or we need to reconstruct the code. In such situation, we can follow the below steps to decompile the code. We can make use of XRM Tool Box and some tool to decompile dll. Steps: Steps to be followed are given below: Open XRM Tool Box–> Assembly Recovery Tool–> Select the plugin–> Click on Export to disk Dll will be downloaded in the local drive Download the code Decompile tool. Link is given below https://www.jetbrains.com/decompiler/ After download Open the Decompile Toolà Open the dll from local drive Your code will be decompiled as shown below Only issue is we must disable the previous plugin and register the plugin assembly and steps again. Now we can make changes in the code. Conclusion: Retrieving the codes from dynamics CRM dlls can be done by following the above easy steps.
Share Story :
Accessing Business Process Flow as Entities – D365 July 2017 Update
Overview: Another new feature announced in the Dynamics 365 July 2017 Update is that the Business Process Flows are now available as entities in D365! That means, you can access them like entities from SiteMap and see the records of their respective entities in an Entity View like you would do with other entities. Turning BPF Entity customization support: Since this is in preview for Dynamics 365 July 2017 Update, you’ll need to turn it on from the Previews section under Settings > Administration. BPF as Entity in Solution: Just like any other entity, the Process appears like an entity. Accessing BPF as entity records: Once this is enabled from the Previews section, you’ll see the entities in the default Sales area as shown below: Business Process Flow as records: Now, so far you’ve seen records having the same business process flows and once you open them, you’d see which records were in which stage. This view gives you which records use a particular Business Process Flow and where has the record reached in the flow. In the above view, each record will open the record of their respective entities. Ex. Jake Cormick is in Process stage and Process stage belongs to Opportunity entity. So opening this record will open the Opportunity record as shown below: Quite Simple! Hope this was helpful.
Share Story :
CRM – Issue with retrieving large document body using Fetch XML
Problem Statement: When we want to export Attachments from CRM (both Notes and Email attachments), we can do this using a Console Application where we read the documentbody from CRM using Fetch XML, and then we convert that to bytes and export to a local folder (or any target system) This Method is proper and should work properly, which it doss most of the time, but fails on some occasions. We have observed an issue, where we were not able to open the downloaded document. It would give below error: “There was an error opening the document. The file is damaged and could not be repaired“. This was the code that we used: private static void ExportEmailAttachments() { string fetchXML = @”<fetch version=’1.0′ output-format=’xml-platform’ mapping=’logical’ distinct=’true’> <entity name=’activitymimeattachment’> <attribute name=’filename’ /> <attribute name=’body’ /> <filter type=’and’> <condition attribute=’filesize’ operator=’gt’ value=’0′ /> <condition attribute=’filename’ operator=’not-null’ /> <link-entity name=’email’ from=’activityid’ to=’objectid’ alias=’ac’> <attribute name=’subject’ /> <attribute name=’regardingobjectid’ /> <attribute name=’activity /> <order attribute=’subject’ descending=’false’ /> <filter type=’and’> <condition attribute=’regardingobjectid’ operator=’not-null’ /> <condition attribute=’modifiedon’ operator=’last-x-months’ value=’3′ /> >”; string FolderPath = @”D:\Attachments\”; EntityCollection allEmailAttachments = crmSvc.RetrieveMultiple(new FetchExpression(fetchXML)); foreach (Entity mimeAttachment in allEmailAttachments.Entities) { string fileName = mimeAttachment.GetAttributeValue<string>(“filename”); if (fileName.EndsWith(“pdf”, StringComparison.OrdinalIgnoreCase)) { string documentBody = mimeAttachment.GetAttributeValue<string>(“body”); byte[] documentBytes = Convert.FromBase64String(documentBody); File.WriteAllBytes(FolderPath + fileName, documentBytes); } } } Solution: We triel lot of methods and various ways to solve, but we found the document was not opening properly. This is what we observed: The issue does not happen with all the files It only happens with large files Observed that the document body from CRM is always exactly 2000 characters From the above, we got to know that CRM is not sending all the document body in the Fetch XML response. We were able to solve the above by removing the “distinct=’true’“. We don’t know how it affects the query, but this was the resolution which worked for us. It is strange, but this fixed the issue. This is the final Fetch XML. string fetchXML = @”<fetch version=’1.0′ output-format=’xml-platform’ mapping=’logical’ distinct=’true’> <entity name=’activitymimeattachment’> <attribute name=’filename’ /> <attribute name=’body’ /> <filter type=’and’> <condition attribute=’filesize’ operator=’gt’ value=’0′ /> <condition attribute=’filename’ operator=’not-null’ /> <link-entity name=’email’ from=’activityid’ to=’objectid’ alias=’ac’> <attribute name=’subject’ /> <attribute name=’regardingobjectid’ /> <attribute name=’activity /> <order attribute=’subject’ descending=’false’ /> <filter type=’and’> <condition attribute=’regardingobjectid’ operator=’not-null’ /> <condition attribute=’modifiedon’ operator=’last-x-months’ value=’3′ /> “; Anyone, who can tell why this is the behavior, please feel free to comment below.
Share Story :
Deprecated Feature in D365 Customer Engagement – July Release (v9)
Introduction: “Deprecated” means Microsoft intends to remove the feature or capability from a future major release of Dynamics 365. The feature or capability will continue to work and is fully supported until it is officially removed. This deprecation notification can span a few years. After removal, the feature or capability will no longer work. Microsoft notifies the Customers and Developers well in advance so that they have sufficient time to take action and update the code. Consolidated list of Deprecated Features in July 2017 release of D365 for Customer Engagement: Click on each of the link for details on Microsoft Official documentation site: Dynamics 365 for Outlook (Outlook client) is deprecated Service scheduling in Dynamics 365 for Customer Service is deprecated Dialogs are deprecated Usage of Parature knowledgebase as the Dynamics 365 knowledge management solution is deprecated Project Service Finder app is deprecated Contracts, Contract Line Items, and Contract Templates entities are deprecated Standard SLAs in Dynamics 365 for Customer Service are deprecated Relationship Roles are deprecated Mail Merge is deprecated Announcements are deprecated Ready-to-use business processes available through Add Ready to Use Business Processes setting are deprecated Some client APIs are deprecated – Details of APIs deprecated with their replacements in the link. EntityMetadata.IsInteractionCentricEnabled property is deprecated Silverlight (XAP) web resource is deprecated We will keep posting more on the details and alternatives for each feature above.
Share Story :
Step Action in Business Process Flow in Dynamics 365 July 2017 update – Preview
Since this is in Preview, it won’t be available for users until next update. However, this is how it works and seems so easy to implement it. Enable Step Action from System Settings: Since this is a Preview feature in Dynamics 365 July 2017 update, it appears in the Previews section where you can go and enable the same. Once you’ve enabled the Preview feature, you should be able to see Action Step visible in the Business Process Flow editor as shown below: Add Action Step in BPF: You can trigger an Action or a Workflow in the Step Action feature. I have a Workflow to create a New Invitation entity record in D365. I’ll be adding the same in the BPF. In the Business Process Flow editor, I’ll add an Add Action Step in one of the stages as shown below: I’ll add the already created a Workflow to the Business Process Flow in the Step Action. Once done, I’ll simply activate the BPF and we can see it in action. Working with Step Action: Let’s see how easy it is to execute this workflow using the Step Action. On the Business Process Flow, I can see that the step appears from what the Display Name in Business Process Flow is set. And clicking on it, the workflow will run the background performing it’s operation. (You’ll see a quick ‘Processing’) message while it triggers the workflow. As seen below, the record for New Invitation was created as directed in the Workflow I created. Conclusion: Putting it simply, it works very quickly and is as simple as clicking a button.
Share Story :
Installing Multiple CRM Portals Instances for Microsoft D365 CRM Online.
Introduction: In this blog, we shall see how can a user install multiple Portal Instances for Microsoft D365 CRM Online. Pre-Requisites: D365 CRM Portals D365 CRM Environment Overview 1. A user can set up more than one Portal for a given D365 Environment provided that the second portal is different from the first portal that is installed. For eg: If the user has already installed a community portal then the user will have to install a different type of portal like partner portal , employee portal etc. 2. The user cannot install two portals of the same type. For eg. If the user has already installed a customer portal then he cannot install multiple portals which are customer portals. 3. As we know that a user can have multiple portals associated with the same D365 (CRM) instance and along with a single D365 Subscription the user gets out of the box a single portal license, which means that the user gets only one free portal add-on. 4. The user can go to the Instance page and install multiple portals as shown below in the available multiple options. In order to have a second portal add-on on the D365 instance the user will have to follow the Steps given below: Step 1: Opening the Admin Center. Â Go to D365 and open admin as shown below. Step 2: Opening the Purchase Service In the Admin Center Page click on the Billing option in the left side menu bar and select Purchase Services under that. Step 3: Selecting the Subscription In the Purchase Services, we will have to find the following subscriptions which are as follows: Dynamics 365 Enterprise Edition – Additional Portal Dynamics 365 Enterprise Edition – Additional Portal Page Views **Note: These Licenses are only shown to the user if they have a purchased license and are not using trial version of the license
Share Story :
How to change the name of Custom App in Dynamics 365
Introduction: This blog consists of steps to change the name of the custom app in Dynamics 365. Initially the app name is “Dynamics 365-custom” as shown below. Steps: We can change the name to our organization name as shown below: Navigate to Settings–> Administration–>System Settings In General Tab–> Set options for the default app:Dynamics 365-custom–>Change the default app name The App name is changed to “CloudFronts Apps” and will be visible as below: Conclusion: Like this way, you can change the name of custom application in Dynamics 365.
Share Story :
AX 2012 R3 Commerce Data Exchange Service: Async Server Installation
Introduction : In AX 2012R3 Commerce Data Exchange, Async Server is a part of the asynchronous system that shares data between the Microsoft Dynamics AX database and channel databases. Async Server is installed at headquarters and communicates with Microsoft Dynamics AX. In addition to Async Server, Commerce Data Exchange includes Commerce Data Exchange: Async Client, which is installed at channels and communicates with the channel database. Below are the steps which need to follow: Step 1: Start Microsoft Dynamics AX Setup. Under Install, select Microsoft Dynamics AX components. Advance through the first wizard pages. If the Setup Support files have not yet been installed on this computer, the Select a file location page is displayed. The Setup Support files are required for installation. Provide a file location or accept the default location, and then click Next. On the Ready to install page, click Install. Step 2: On the Select installation type page, click Custom installation, and then click Next. On the Select components page, select Async Server, and then click Next. Step 3: Prerequisite validation results page, resolve any errors. For more information about how to resolve prerequisite errors. When no errors remain, click Next. Step 4 : Configure Async Server page, select the check box to configure Async Server by using Setup. If you clear this check box, the application files are installed, but Async Server is not configured. If you’re configuring Async Server, enter the following information: Application name – The name of the web application that hosts Async Server. App pool name – The name of the application pool that the web application runs under. Website name – The name of the website that Async Server runs on. User name and Password– The credentials for the application pool identity. HTTPS port – The port on which Async Server receives HTTPS requests. You can specify any available port. Verify that the port is open in Windows Firewall, and record the port number. The port is used to create the URL for Async Server in the following format: https://<server name>:port/<web application name>. This URL is required when you configure instances of Async Client that connect to this instance of Async Server. TCP port (optional) – The port on which Async Server receives TCP requests. Specify a TCP port if your environment uses high-performance data synchronization. You can specify any available port. Verify that the port is open in Windows Firewall. AOS service user – The user account that the instance of Microsoft Dynamics AX Application Object Server (AOS) runs as. SSL certificate thumbprint – The thumbprint for the Secure Sockets Layer (SSL) encryption certificate. You must obtain a valid, registered certificate from a provider. Step 5: Select Server Name and Message Database Name. if DataBase does not exit then mention the Name. Setup will create the database. Step 6: the Prerequisite validation results page, resolve any errors. For more information about how to resolve prerequisite errors. When no errors remain, click Next. Step 7: Click on Install button. Conclusion: By following above steps, you can install Async Server for Retail HQ.
Share Story :
Multi-Select Option Sets in D365 July 2017 Update
Introduction: Finally, one of the most sought after feature is here in the D365 July 2017 Update. The Multi-Select Option Set! A new attribute type added to D365, you can now create Multi-Level OptionSets in D365. Creating a Multi Select OptionSet: A new attribute type is now available that lets you create Multi-Select Option Set. 1. When you create a new field, you’ll see an option to create a Multi-Select Option Set. 2. Here, I’m creating an Option Set for choice of Subjects for Newsletter Company. I’ve named the field as Subjects and I’ll let users select which all subjects is a particular customer interested in in the Enrollment entity. 3. The Multi-Select Option Set looks like a usual option set and my options look like this 4. And I’ll add the same in my form as well and Publish all my changes. Using Multi-Select Option Set: Below is how you can select multiple values in the Multi-Select Option Set. Once on the form, here’s how you can use the Multi Select Option Sets 1. They come with auto-complete feature, so you can start typing the options and they will show up 2. Now, I have selected 3 options namely Technical, History and Science and my subject of interests. 3. Once selected, they appear separated by semicolon (;) And I’ll save the record. Multi Select Option Set on Views: You can see selected values in the Multi-Select Option Sets on the entity views as well. Some Features: Below are the features of the Multi-Select Option Sets Auto-complete the results. Can hold up to 150 values Can be used in Advanced Find as well as FetchXML queries. Hope this was helpful!