Kelsey Petersen No Comments

Dynamics 365 – Group by Views

As you are probably aware, Dynamics CRM is undergoing some changes and one of them is a new name, Dynamics 365. My blog posts this month will focus on some of the functionality updates available in v8.2 and our next meetup will review them in more detail. Be sure to sign up and join us!

Another cool, new feature is that you can group by fields directly from a view within CRM. You don’t have to create a report or export to Excel to group the data. In the customizations area, click on the name of the entity then open the Controls tab.


Then add a control and choose Editable Grid.


Finally, choose which devices you want to be able to use the editable grid control. Save and publish your changes.


Navigate to the entity and you will now see a box where you can specify how to group the records in the view. The options will be limited to the fields seen in the view. For example, if you want to group by State or Province you will need to add this field to the view first.

Kelsey Petersen No Comments

Dynamics 365 – Roll Up Custom Entity Activities

As you are probably aware, Dynamics CRM is undergoing some changes and one of them is a new name, Dynamics 365. My blog posts this month will focus on some of the functionality updates available in v8.2 and our next meetup will review them in more detail. Be sure to sign up and join us!

Historically, when you have activities associated with a custom entity, those activities do not roll up to the related account. This can be frustrating because you aren’t able to get the full picture from the account like you’d expect. Now you’re able to specify if activities roll up from custom entities. Open the relationship screen between the account and your custom entity. There will be an option to change the Rollup View from Cascade None to Cascade All. Save and publish your changes and you’re all set!

Kelsey Petersen No Comments

Dynamics 365 – Sorting Activities in the Social Pane

As you are probably aware, Dynamics CRM is undergoing some changes and one of them is a new name, Dynamics 365. My blog posts this month will focus on some of the functionality updates available in v8.2 and our next meetup will review them in more detail. Be sure to sign up and join us!

If your organization uses the activities entities (tasks, appointments, phone calls, etc.) then you are likely familiar with the social pane view that is available on the main entities. You may also know that the social pane is barely customizable so I’m very excited about this update. You can now determine how you want to sort activities in the social pane. By default, they are sorted by modified date and in most cases this might be fine but having the ability to change how the activities are sorted is very helpful.

Open the form editor and double click on the activities section to see the properties. Go to the Activity Wall to change how items are sorted.

You may also notice that one of the options is to sort by a field called Sort Date. This is a field that can be set in a workflow so each activity type can use a different sort date. For example, you may want to sort emails by their sent or received date while sorting appointments by their end date. If you set the sort date field accordingly, then you’re able to sort activities by the different dates.

Kelsey Petersen No Comments

MSCRM: Automate Tax on Products

The out-of-the-box tax field on opportunity and quote products is a write-in field which means that users have to manually calculate the sales tax for each item and then type it in. This method is error prone and adds many steps to the user’s process so why not automate it?

If only some of your items are taxable, you should create a checkbox so that users can control when sales tax needs to be added. For this example, I’m assuming that all products are taxable at a rate of 6%. Create a calculated currency field and for the calculation use the Amount field. This is the price per unit multiplied by the quantity. If you’re using item discounts, make sure you calculate the tax based on the total after the discount is taken. See the setup below.


The final step is to set the out-of-the-box tax field to your new calculated tax field. You need to do this because the final total calculation uses the out-of-the-box tax field. I used JavaScript – tune into the next webinar to see how this is done. (Or check it out on YouTube depending on when you’re reading this.)


Kelsey Petersen No Comments

MSCRM: Change Your Sandbox Theme

If you regularly develop in a CRM sandbox instance, a good tip is to change the theme of  your sandbox so that it’s different than your production instance. Our production instance has the standard dark blue navigation bar across the top so we like to change that to bright orange for the sandbox. This way it is very obvious that you’re currently working in the sandbox. It’s an easy visual cue to remind yourself which instance you’re in.


Change your theme by going to Settings > Customizations > Themes.


Kelsey Petersen No Comments

MSCRM: Business Rules & Composite Forms

The address composite forms are used to quickly edit all fields of the address and present all of the fields together in a visually appealing manner. The trouble is that you can’t customize these forms at all. You can’t add or remove fields so when I wanted to use an option set for a customer State/Province field, I had to figure out a workaround.


Luckily, business rules can be applied to all forms of an entity so I set up a rule to hide the out-of-the-box state at all times. Then my custom option set state field is placed on the main form. I have another rule that sets the out-of-the-box state field to the option set value so that the full address appears correctly. In the business rule, just remember to set the scope to entity so that it applies to all forms.


Kelsey Petersen No Comments

MSCRM – Use JavaScript to Show/Hide Sensitive Data

In this post, I’ll show you how to use JavaScript to show fields for a set amount of time then hide them again. My scenario involves a client that needs sensitive customer data stored in their CRM but it doesn’t need to be visible on the screen at all times. I created a checkbox and some simple JavaScript so that they can choose when to see the data. The data will automatically switch back to hidden again after 5 seconds. The purpose of this is to ensure that the data isn’t inadvertently left visible on the screen. In most cases, they only need to use the data for identification purposes so 5 seconds is long enough.

First, create a checkbox (data type of Two Options) for your form and name it something like “Show Sensitive Data.” Add the new field to your form near the field containing the sensitive data and make sure the default visibility setting for your hidden field is unchecked.


Create and/or add a JavaScript library to your form and paste the following functions into it. Anything in quotations needs to be updated based on the names of your fields. For example, “new_showhidesensitivedata” is the schema name for my checkbox and “new_sensitive” is the schema name for the field containing sensitive info.

//used with showSensData
function checkSensData() {
    var check = Xrm.Page.getAttribute(“new_showhidesensitivedata”).getValue();
    var option =“new_showhidesensitivedata”);
    if (check) {

//show or hide sensitive data fields based on checkbox value. waits 5 secs before auto-hiding
function showSensData(){
    var check = Xrm.Page.getAttribute(“new_showhidesensitivedata”).getValue();
    var option =“new_showhidesensitivedata”);
    var controlSens = Xrm.Page.getControl(“new_sensitive”);
        setTimeout(checkSensData, 5000);

The function “checkSensData” will only be called by the main function to uncheck the box automatically for us. The main function “showSensData” should be set up to trigger on change of the checkbox field. Register for next month’s Dynamics CRM webinar to see it in action!



Kelsey Petersen No Comments

MSCRM – Shorten that Social Pane!

This tip is for the Dynamics CRM newbies. When you’re customizing the out-of-the-box forms, almost all of them have the Social Pane section where you can see Posts, Activities, and Notes. By default, this area tends to take up a lot of space on the form and can therefore lead to a lot of unwanted white space. If you open the properties and go to the Formatting tab, you’ll see there is no option to specify the number of rows that it should occupy.


Another bug that I notice sometimes is that when I change the default tab through the properties, nothing changes on the form. The original default tab remains.


The solution is to completely remove the original Activities section that appears on the form. Don’t worry, we can get it back. Once you remove it, go to the Insert tab at the top of the form editor window and click the item that says “Notes.”


This will get the activities area back on your form. Modify the properties as you like and you’ll see that on the Formatting tab, we can now specify the number of rows. Woohoo!


Kelsey Petersen No Comments

MSCRM – Real-Time Workflow Alerts

In Microsoft Dynamics CRM, there are two types of timing for executing workflows: background and real-time. You can read about the details of each online but the main difference is that the steps of real-time workflows are executed as part of a single transaction whereas background workflows are scheduled by the asynchronous process server. Don’t worry, the rest of the post is not this technical 🙂 A real-time workflow can be used to alert the user when a specific condition is met. The workflow will also stop as a result.

In my example, we have a very strict sales process dictating that the opportunity must be at least 30 days old before it can be closed. Your real-time workflow could run anytime the status of your opportunity changes to closed. If the age of the opportunity is less than 30 days, an alert will appear with a message of your choice. Now the appearance of the alert is not very friendly since it says “Business Process Error” but the mechanism can still be useful once you get past that.


Kelsey Petersen No Comments

MSCRM – Counting Child Records

If you haven’t worked with the calculated and rollup field types in MSCRM, you’re missing out! They really help to automate calculations and provide an easy way of doing tasks that you previously had to do with JavaScript or workflows. I’m going to review a few examples of calculated and rollup fields that I have found useful for many clients.

Sometimes you may want to know how many child records a customer has. For example, how many opportunities have you had with a particular client and moreover how many were won vs. lost. Management may want to know how many open or active quotes are currently out to customers. You can quickly get this number by using a rollup field. My example will demonstrate how to get the number of won opportunities for an account.

  1. Create a new field on the account. The Data Type will be Whole Number and the Field Type will be Rollup.
  2. When you click on Edit next to the field type, the field will be created a new window will open where you can set the criteria.
  3. Under Related Entity, choose Opportunities (Account).
  4. For the filter, set it to look at only opportunities with a status of Won.
  5. Finally, for the aggregation set it to Count of Opportunity.

Here is what the rollup settings look like when finished. You could also do something similar to sum the total revenue across all won opportunities.

Rollup Count

The field will update automatically every evening when a scheduled system job runs. You can also manually update the field by clicking on the small refresh icon.

Rollup Refresh