Skip to content

Tag: Customizing

ClickDimensions Quick Send from any entity

Posted in ClickDimensions, Dynamics 365, and Power Platform

Last year I had a customer requirement to start a ClickDimensions Quick Send on a custom entity. By default, QuickSend is only available on lead, contact and opportunity. ClickDimensions has already an article on how creating a Quick Send like dialog to send a single email from any entity, but dialogs are deprecated. Therefore I made a deep dive into how the Quick Send button works and will share my findings with you.

The button

I will only focus on the command, I think button labels and button icons should be no problem for customizers.

Rebuild the command and use your own javascript in yellow marked areas.

The javascript

The following is just to give you a starting point. You need to fill it with additional logic to refer it to a contact or lead.

function openQuickSendForm() 
{
   // [CUSTOMIZE
   var type = 2;
   var typeName = "contact";
   var id = "{332514B1-14F7-E711-A95F-000D3AB6ED20}";
   // CUSTOMIZE]

   var accountKey = getAccountKey();
   var region = getRegion();
   var crmVersion = getCrmVersion();
   var orglcid = parent.Xrm.Page.context.getOrgLcid();
   var orgName = Xrm.Page.context.getOrgUniqueName();
   var lcid = Xrm.Page.context.getUserLcid();
   var userId = Xrm.Page.context.getUserId();

   var params = 
      '&id=' + id + 
      '&orglcid=' + orglcid + 
      '&orgname=' + orgName + 
      '&type=' + type + 
      '&typename=' + typeName + 
      '&userlcid=' + lcid + 
      '&userid=' + userId;
   
   var url = 
      'https://app' + region + '.clickdimensions.com' +
	  '/MSCRM/v' + crmVersion + '/pages/quicksendemailtemplateForm.aspx' 
	  + '?accountKey=' + accountKey + params;
   
   _security.CreateSecuritySession(function (sessionId) 
   {
      url += '&sessionId=' + sessionId;
      window.open(
	     url, 
		 'quicksendWindow', 
		 'height=800px,width=730px,status=0,toolbar=0,resizable=1,scrollbars=1'
      );
   });
}

Missing privilege for editable grids

Posted in Dynamics 365, Power Platform, and Revive

In one of our last projects we used an editable grid from Microsoft, but had a strange issue.
Read here how we detected and identified a missing privilege for editable grids.

Issue

During testing with an user account we found that the editable grid for a custom entity does not render. For admins is all fine.
This is how it should look.

This what it actually was.

Analysis

First thing we’ve checked was whether someone has changed the form rendering mode because editable subgrids don’t work on legacy forms. But it was still correct set.

Also we checked the known editable grids limitations for fields from related entities, the state field, partylists, customer and composite fields. But there was no such field in the view.

Further we’ve checked the users security roles. They have a custom role, but it includes all privileges for the parent and child entity.

Next we proved what happens when we remove the editable grid control and use the read only version instead. As a result, everything was ok in the read only grid.

Now I had a look at the browser console and found an error . . . a few times.

As desperation act we gave the user the default sales person security role and were surprised that now everything worked fine.

Identify the missing privilege for editable grids

We compared the two security roles and identified the “prvReadRole” as origin of the issue.
It was set to “None Selected”. I assume it is needed by the editable grid control the check if the user has all necessary privileges to edit the records in his security roles.

Disabled “From” field on email entity

Posted in Dynamics 365, and Power Platform

After an update to Dynamics CRM 8.1.0.359 it happens that the “From” field of the email entity is permanently disabled / locked on all forms, even in the workflow-editor.
It seems as the updates deletes a part of the fieldsettings. But you can easily restore the settings.

  1. Create a new solution with the “From” field of the email entity in it.
  2. Export the solution, unzip it and open the customizations.xml.
  3. Find the tag:
    <LookupTypes />
  4. Replace it with:
    <LookupTypes>
       <LookupType id="00000000-0000-0000-0000-000000000000">8</LookupType>
       <LookupType id="00000000-0000-0000-0000-000000000000">2020</LookupType>
    </LookupTypes>
  5. Save the customizations.xml and zip it again into the solution file.
  6. Upload and publish the updated solution.

All credits go to the people of the following threads. They found and tested the solution.

E-mail tracking with custom email fields

Posted in Dynamics 365, Power Platform, and Revive

Anyone who has ever worked with the Dynamics CRM for Outlook client, is familiar with the procedure of email tracking. You press the “Track” button and the CRM client creates on an e-mail record on the CRM server which again resolves the recipient and sender addresses, and linked to the corresponding records. But what if I want to same more e-mail addresses?

Are e-mails tracked when the e-mail adress is noted in a custom field?

The entity “Contact” has by default already three e-mail address fields. So, I’ve created a custom field as the fourth e-mail field.

When creating your own e-mail address field, it is important that chooses the “e-mail” format. So the CRM know that it can search here for e-mail addresses. By the way is then performed a validation in this field and the e-mail address is formatted as a mailto link, so that your email client will directly open when you click it.

Next, I’ve created a contact record with four different e-mail addresses and wrote them a message to them and tracked it.

Conclusion to E-mail tracking with custom E-mail fields

In the following screenshot you can see that it works perfectly. All present and the new e-mail address field are actually assigned only by tracking to the contact, to set a regarding was not necessary.