Add Custom Icons with tooltip for a column
Now, it’s possible to make your CRM views visually more informative. This is a cool new feature which is in preview for Dynamics 365 for December 2016 release. You can now add custom icon with tooltip text to display a column based on the column value. First thing need to be done to achieve this is – upload the custom icons as web resources in your Dynamics 365. Then, use these icons using JavaScript web resources. Adding JavaScript code The following 2 new attributes have been added to layoutxml of savedquery – imageproviderwebresource imageproviderfuntionname The JavaScript code gets executed when the page loads. Following is how you can add Icons to the columns: In this example, I will add 3 types of images to the Open Opportunity View and based on whether the Opportunity is Hot, Warm or Cold, I’ll display a different emoji representing each. 1. Take 16×16 images and upload them as Web Resource in Dynamics 365. In my example, I’m using a “happy” and “sad” emoji to represent if the Opportunity is Hot or Cold. 2. Create a new Web Resource of type JavaScript to handle these icons when the Opportunity is either Cold, Warm or Hot. In the above code, row object and the User’s LCID is passed as parameters. I’m selecting the image to be displayed (Web Resource names of the images in D365) based on the value in str.opportunityratingcode_Value. 3. Once I have this code ready, I’ll import this JS as a Web Resource in D365. 4. I’ll navigate to the view I want to add this functionality to and double click the column to edit the property of the column as shown below: 5. In the above example, I’m selecting my JS Web Resource new_IconInCols and the function as displayIconTooltip. 6. Once everything is set, I’ll publish all the changes and refresh my view with relevant data. 7. Finally, my data looks like this on the View: Hot = Happy Warm = Neutral Cold = Sad 8. Also, if you hover over the icon itself, you’ll see what tooltip it has – Hope this was helpful!
Share Story :
Leveraging FetchXML with Dynamics CRM
Overview: FetchXML is used to query the Dynamics 365 database. A great advantage of using FetchXML is that it can be easily designed by using Dynamics 365 database and it is easy to understand. FetchXML tester is available in the XRM Toolbox which can let you test and fetch results quickly. FetchXML also provides facilities like aggregation and grouping of data. Using FetchXML: FetchXML must conform to the fetch.xsd schema provided with the Dynamics 365 SDK under the directory SDK\Schemas\fetch.xsd FetchXML must be built into a query string which can be used with IOrganizationService.RetrieveMultiple to retrieve data from Dynamics 365. FetchXML query can be saved in Dynamics 365 by creating a SavedQuery record. From the above sample query, a query can be constructed inside <fetch></fetch> tags. In the above example, I’m retrieving Contact records with the attributes Contact ID which is the Primary Key and the Full Name of the Contact. In the above query, using count=’3’ will retrieve a maximum of 3 records. Executing the FetchXML query: You can simply use the above query in the FetchXML tester provided in the XRM Toolbox and get results or you can construct a query string and use it with IOrganizationService.RetrieveMultiple() and get results in the EntityCollection object in your application. Using the above query, here’s how I can make it into a query string and retrieve the results in my application. Then, I can use foreach() to loop through the result returned in the EntityCollection. FetchXML Aggregation: The following aggregation functions are provided in FetchXML: sum avg min max count(*) count(attribute name) Example of max used with aggregation: In the above example, I’ve used the attribute aggregate=”true” in the FetchXML header and used an aggregate aggregate=”max” with the field Employee which is count of Employees in an Account. The result returned for the same was: The above result returned a formatted value of 13000 which is the max for an Account. Also, notice that the tag is <total></total> since it was the alias I used in the query. Likewise, you can use other aggregates and grouping functions. Understanding Results of FetchXML: FetchXML results are returned in the <resultset></resultset> tags as shown in the sample below: Each record is retrieved under an individual <result></result> tags. Paging: At maximum, a FetchXML query can return not more than 5000 records. If results are more than 5000, morerecords attribute in the resultset will return “1” and will be shown like below: In order to fetch further records, you’ll need to use PagingCookie. A sample code has been provided in the SDK under SampleCode\CS\GeneralProgramming\Queries\FetchPagingWithCookie.cs to leverage the same. Also, if you want to return results with even smaller numbers, you can use paging in the FetchXML tested by using the following: In the above example, I’m choosing to show only 2 records per page and I’m retrieving page no. 2 of all the records. Hope this was helpful!
Share Story :
Editable Grids in Dynamics 365
Introduction: Editable Grid is a new feature introduced Out-Of-The-Box with D365 to ease of most common necessity of editing records from the grid itself. Up until now, you had to explicitly open a record and then update the changes. With Editable Grids, You can enable Editable Grid at the entity level so that all Entity Views are converted to Editable Grids or also on a specific form where subgrid is used. Enable Editable Grid on the Entity Currently, this is how your default read-only grid looks: Navigate to your entity in the Default Solution (Settings > Customization > Customize The System > Default Solution > Entity) on which you want to enable Editable Grid. Then select the Controls tab on the entity as shown below: The click on Add Control… hyperlink as mentioned below: Once you see the window as below, select Editable Grid and click on Add. Once this has been enabled for the entity, you can make the change in the Control section as shown below: I’ve chosen to have Editable Grid for Web, Phone and Tablet as well. Save and Publish the entity changes. At this point, the Grid has been enabled on the Entity level. Enable Editable Grid on the Form Now, Editable Grid has been enabled for that entity. You can go to your form where you already are using this entity’s subgrid on its form. Open the Form Editor of that form. Double click on the Grid to show it’s properties. Navigate to Controls tab: Now, click on the Add Control similar to the step shown to enable Editable Grid on the Entity level. Make sure the options are selected to use Editable Grid and click OK. Save and Publish changes made to the form and refresh the form to see the change. You can now see the subgrid used has changed: Use Editable Grid You can quickly hover over the column and record value and change it easily. Also, fields that are read only, like System Fields will be shown representing a lock indicating that they can’t be edited. These are some of the basic uses of Editable Grid. More information is provided by Microsoft on their official documentation here: https://msdn.microsoft.com/en-us/library/mt788312.aspx.
Share Story :
Freeing Storage Space in Dynamics 365
Problem Statement: Data in you CRM is critical and storage space for CRM is expensive i.e. $9.99/GB/Month. Often, CRM space is taken up by Attachments and background data (ex: completed system jobs and it is difficult to realize where our space is being consumed. This blog is about some quick tips to free your storage space and optimize CRM data usage to reduce costs. Step1: Request Consumption of your storage in CRM to Microsoft Support We can create a Service Request with Microsoft requesting the storage details of CRM environment. Here’s how you can create a service request under the correct category in Office 365 Service Request to request the storage details of CRM. The type of Service Request should be Dynamics 365. Then, select Feature as Online Service Availability and Administration Center and Symptom as storage. Mention your description something like the below: Click Next and provide your details, email and phone number. Once Microsoft acknowledges this, they will provide you details of the top 10 utilized tables in Dynamics 365 / CRM. You’ll get an email from a Microsoft Support Representation mentioning the details of the storage consumption something like this: In this example I used, I could see that Attachments was the table that consumed about 13GB of data! That is very expensive to store attachments in CRM. So first, we will proceed towards how we can curb the usage of storage in CRM by first putting all attachments in SharePoint Online (which is available in most Office 365 plans). Since, SharePoint space is way cheaper than CRM ($0.20/GB/Month) and SharePoint provides 1TB in my base subscription at no additional cost. Step 2: Use PowerAttachment by PowerObjects to migrate attachments to SharePoint A very useful tool is PowerAttachment by PowerObjects. PowerAttachment moves your attachments from CRM to SharePoint, thus freeing up critical space in CRM which can be utilized for important data Once the PowerAttachment is configured with your CRM / D365, the attachments are moved to SharePoint and the attachment link in the parent items, say, email – is replaced by the link to the SharePoint location to where the file was moved. Thus, moving attachments to SharePoint frees a massive amount of space from CRM which usually attachments take and moves them over to a cheaper storage option. Step 3: Bulk Delete Background Data – Mailbox Alerts and Workflow/System Jobs Examples Now, among several types of background data, what applied in my case, was the alerts created behind the scenes since I configured the Mailboxes of users for Server Side Sync. As you can see in the above, you can see that there were about 3,808,246 records when I requested them. That was consuming way too much of data that was irrelevant to me. So, I chose to eliminate the same using Bulk Delete. Mailbox Alerts Mailbox Alerts are something created by Mailboxes when certain tests/authentication fails. In my scenario, they created gigantic amount of records. Using Bulk Delete, I queries all of those and started the Bulk Delete to Delete them. Here, we will use Bulk Delete. Navigate to Settings > Data Management > Bulk Record Deletion. I defined the Search Criteria to query Traces entity and I didn’t select any criteria since I wanted all the records to be removed. And this is how records will be shown. The above example shows very less records. Let’s assume there are huge records like more than 100,000 records. Depending on how many records are queries, the Bulk Delete operation took several hours but freed a great deal of expensive storage space. Completed System Jobs / Workflow Jobs Another important chunk of huge data is consumed by completed, failed System Jobs and workflow jobs from the System which take up hundreds and thousands of records of data. As shown in the above example, I am using Bulk Deletion job to remove the System Jobs/Workflow jobs. Below is the criteria I select considering that I might need to look at a few records in recent past and delete the rest of them: Also, I kept this Bulk Deletion job to re-occur every 90 so that it takes a fresh batch of records older jobs created in 1 month’s span. Above are only 2 of several types of data that can be cleaned depending on what is needed. Also, more effective ways are also mentioned by Microsoft. Here’s the link to the same: https://technet.microsoft.com/en-us/library/dn683569.aspx
Share Story :
Dynamics 365 – Relationship Assistant
We all need to remind ourselves of what to do when we navigate around in our Dynamics 365. What if someone reminds you to do the same? Hence, Relationship Assistant. Relationship Insights are a new set of features introduced as preview in the Dynamics 365 December 2016 release. It is only available in the US market i.e. .crm.dynamics.com. Setting up Since Relationship Assistant is a part of Relationship Insights, Relationship Insights is available in this version for preview only. To enable this for the organization, navigate to Settings > Administration > System Settings (picture 1) and on the last Previews (picture 2) tab, scroll to the very bottom. As shown in the picture 2 above, shift the radio selection to Yes on the Enable Relationship Assistant. You’ll have Relationship Assistant now enabled for your organization. Next, to see if Relationship Assistant is setup and tweak the settings of the same, you’ll need to go to the Relationship Insights option under Settings as shown below: On the same, you’ll be asked to agree to the terms and move ahead. (which I already did while writing this blog) Once in Relationship Insights, you’ll see 3 tabs to show 3 sub-features of Relationship Insights. Under Relationship Assistant tab, make sure the option Turn on the Relationship Assistant for your organization is tick marked as shown below: A typical card Here’s how a typical card in Relationship Assistant looks like. (1) is the entire card. It shows you information subjective to the card. It will tell you what type of card it is. The icon on the card quickly tells us what type of card it is with the heading. (2) – These are the actionable buttons for the card. Like in the example above, the card is showing that there was no action in recent past. So, you can either chose to open the opportunity or send an email to the Regarding of the Opportunity contact with the mentioned actionable buttons. (3) – This button snoozes the card for a while and removes it temporarily. (4) – Close the card from here. Using Relationship Assistant Here’s how you can use the new Relationship Assistant. Navigate to a Contact record, you’ll see Assistant as the new section in your Activity feeds area. Once you click on Let’s Go, you’re all set to use the new assistant. It’ll take a while to load everything for you. Now, I have an example where there is a Contact called Priyesh Wagh and I also an Opportunity regarding the same Contact that is due the next day. So when I open the Opportunity, the Assistant prompts me that the Opportunity is closing soon. Since these cards are actionable, you chose what to do with it. You can snooze it, close it out or Open the record from the button provided there. This helps you to take measures in the right directions easily with the help of Relationship Insights. There are several cards that are context based and appear in various areas throughout Dynamics 365. Check Relationship Assistant Preferences area below. Relationship Assistant Preferences Under the Relationship Assistant area, you can see there are several types of Cards which you can enable/disable or set different preferences for. Highlights of the same are as below: Base Cards These cards are based on the activities or actionable items that are due the same day. Here is what they all are. Email Cards from Exchange These cards are fetched based on Emails and Appointments available in Exchange. Dynamics 365 polls for your Exchange Account and fetched information which is relevant to D365 records and show appropriate cards where needed. These are the cards which can be enabled. Relationship Analytics Cards These cards are based on your actions taken in Dynamics 365 in the past. Cards based on the same can be set preferences for here. Email Engagement Cards Email Engagement is a separate suite feature of Relationship Assistant. It is based on whether you want to track the email sent from Dynamics 365 or not. If yes, assistant shows you the following cards based on the below preferences: Productivity Cards These cards are productivity based and shows you information based on what is important soon or nearby. ‘Today’ cards Self-explanatorily, these cards show what is upcoming for the same day. You’ll need to save your changes to reflect them throughout Dynamics 365.
Share Story :
Auto Capture – Dynamics 365
Auto Capture is a feature introduced in D365 so that you don’t need to go to your Outlook and explicitly tracked Emails to Dynamics 365. This is one cool feature that can help you poll your personal emails and show you if you want to track it or not! Overview Auto Capture is a sub-feature of Relationship Insights. Relationship Insights is a preview feature in December 2016 update for MS Dynamics 365 Online. Integrates with Microsoft Exchange to find and display relevant emails with other activities that are related to a given record in Dynamics 365. Auto Capture shows you message in private i.e. only to the logged in user. System Administrators too don’t see these emails. Server Side Synchronization must be enabled to use this feature. Enable the Preview Since this is in preview, you’ll need to enable it for the organization in the following manner: Navigate to Settings > Administration > System Settings. Go to the last tab, Previews. Agree to the terms on the top and scroll down to the very bottom. Select Yes for the Enable Auto Capture feature as shown below: Then, navigate to Settings > Relationship Insights. You can choose the same and agree to the terms as shown: Upon agreement, you’ll see the three tabs as shown below: Make sure the Turn on Auto Capture for your organization is already checked. If not, check it and Save the same. Auto Capture has now been enabled for your organization. Auto Capture Auto Capture messages are queried to your Microsoft Exchange account every time you open the Activities section of a record. Once this has been enabled, you can navigate to different records like Accounts, Contacts etc. and see under Activities that certain emails which are relevant to the record you are viewing have been polled and are marked with dotted border: This email is only visible and is not yet tracked into Dynamics 365. It will be tracked only once you chose to do so. You can track this email in Dynamics 365 by hovering over the email in Activities and you’ll see a TRACK link on the same as shown below: Once you click on track, the Email will be queued to pull in Dynamics 365. Once the email is successfully tracked, it will appear like a usual Activity item shown on the form under Activities: This email can then also be seen in the Activities in Dynamics 365. What Messages are captured? Below are the criteria for polling messages from your Exchange Account.
