{New Tool} Crypto for Dynamics 365

It has been a while that there was a new tool being published from my end on Dynamics CRM. One of the recent things that I noticed which was needed was the ability of people to be able to encrypt sensitive/critical information.

This is particularly relevant in some scenarios in Dynamics 365 implementations such as:

  • Storing Credit card information in Dynamics 365
  • Storing bank account details in Dynamics 365
  • Storing sensitive information such as Public service numbers in Dynamics 365(For example Social security number in US, etc.)

In all such scenarios, there is need to encrypt certain fields in addition to field security. Me and fellow CRM community member Simaranjit researched about this and have come up with a set of workflow activities which let you encrypt and decrypt the fields that you wish. Not only that you can choose between two encryption standards:

AES Encryption

AES (acronym of Advanced Encryption Standard) is a symmetric encryption algorithm.

The method looks like this:

  • From the 128-bit key, AES generates 10 keys of 128 bits each.
  • These keys are placed into 4×4 arrays.
  • The plain text is also divided into 4×4 arrays (128 bits each).
  • Each of the 128-bit plain-text items is processed in 10 rounds (10 rounds for 128-bit-keys, 12 for 192, 14 for 256).
  • After the 10th round the code is generated.
  • Each single byte is substituted in an S box and replaced by the reciprocal on GF (2 8).
  • Then a bit-wise modulo-2 matrix is applied, followed by an XOR operation with 63.
  • The lines of the matrices are sorted cyclically.
  • The columns of the matrix multiplication are interchanged on GF (2 8).
  • The sub-keys of each round are subjected to an XOR operation

MD5 Encryption with TES Algorithm

The MD5 algorithm is a widely-used hash function producing a 128-bit hash value. Due to its vulnerabilities, we have combined the MD5 algorithm with another algorithm Triple DES Cryptography to enhance its performance. A configured alphanumeric string is used for computing the hash key.

Here is a video demonstrating the tool:

Here is the download link: Click here

Note: This is one way of encryption/decrypting CRM data and adding additional security on top. CRM provides encryption over the database as shared on following link:  Click here

Hope it helps and Happy CRMing!

ABOUT THE AUTHOR:

clip_image001

Twitter: https://twitter.com/msdynamicsblog
LinkedIn: https://www.linkedin.com/in/deepesh-somani-00296932

Google Play Store:

https://play.google.com/store/apps/details?id=com.dynamicsofdynamicscrm.msdynamicsblog&hl=en

Advertisement

{Quick Tip} Add Record Hyperlink with text in Send Email via workflow in Dynamics CRM

It is a very common scenario to send record URL while sending emails from Workflows in Dynamics CRM.

Ever been in a situation where notifications need to be sent with URL via Email to a user/set of users for example on creation of a new Opportunity.

Using out of box workflow(Settings->Process->New) and Send Email step, this can be achieved easily:

clip_image002

Send Email step Set Properties:

clip_image004

When Email is sent out, it will appear as below:

clip_image006

Notice the way that the record URL does not appear as a hyperlink but full URL.

Here is a simple solution to make record URL appear as Hyperlink:

Navigate back to the Send Email step of the workflow, Click set properties and Select Insert Hyperlink:

clip_image008

Insert Text and select URL as Record Dynamics URL and click OK:

clip_image010

Notice that this time Email body will be generated with hyperlink with a meaningful text:

clip_image012

Remember, Giving attention to Little details creates the best user experience!

Please keep in mind that in internet facing deployments the record URL always points to the external URL. This can be a bit annoying for users as they probably need to authenticate before they can open the record mentioned in the email.

Hope it helps and Happy CRMing!

ABOUT THE AUTHOR:

clip_image001

Twitter: https://twitter.com/msdynamicsblog
LinkedIn: https://www.linkedin.com/in/deepesh-somani-00296932

Google Play Store:

https://play.google.com/store/apps/details?id=com.dynamicsofdynamicscrm.msdynamicsblog&hl=en

{Code Tip} Get record ID using FetchXml for any entity record based on MAX or MIN field value

I had written some posts a while back on Aggregate FetchXml queries here:

https://dynamicsofdynamicscrm.com/2014/07/23/aggregate-fetchxml-queries-for-dynamics-crm-20112013/

https://dynamicsofdynamicscrm.com/2015/10/01/code-tipaggregate-fetchxml-queries-code-for-dynamics-crm/

Recently in a project somebody referred to my query to first get the highest opportunity estimated revenue and then used a second query for getting the record id by passing a condition for highest revenue returned via the first aggregate query.

There is a lot simpler approach and single query which can be used for scenarios like:

“Get the recordid for the record where field is maximum across all records”

or

“Get the recordid for the record where field is minimum across all records”

Here are some examples below with Opportunity and estimated revenue on CRM online trial data:

Opportunity with highest estimated revenue

<fetch top=1>

  <entity name=opportunity>

    <attribute name=name/>

    <attribute name=estimatedvalue/>

    <filter type=and>

      <condition attribute=estimatedvalueoperator=not-null/>

    </filter>

    <order attribute=estimatedvaluedescending=true/>

  </entity>

</fetch>

Output is as below:

clip_image001[4]

Opportunity with lowest estimated revenue

<fetch top=1>

  <entity name=opportunity>

    <attribute name=name/>

    <attribute name=estimatedvalue/>

    <filter type=and>

      <condition attribute=estimatedvalueoperator=not-null/>

    </filter>

    <order attribute=estimatedvalue/>

  </entity>

</fetch>

Output is as below:

clip_image002[4]

However, in practical scenarios it is always good to do a comparison with second highest or second lowest Opportunity estimated revenue(even more or can filter by some id fields/etc.).

Top 2 opportunities with highest estimated revenue

Output i

<fetch top=2>

  <entity name=opportunity>

    <attribute name=name/>

    <attribute name=estimatedvalue/>

    <filter type=and>

      <condition attribute=estimatedvalueoperator=not-null/>

    </filter>

    <order attribute=estimatedvaluedescending=true/>

  </entity>

</fetch>

Output is as below:

clip_image003[4]

Bottom 2 Opportunity with lowest estimated revenue

<fetch top=2>

  <entity name=opportunity>

    <attribute name=name/>

    <attribute name=estimatedvalue/>

    <filter type=and>

      <condition attribute=estimatedvalueoperator=not-null/>

    </filter>

    <order attribute=estimatedvalue/>

  </entity>

</fetch>

Output is as below:

clip_image004[4]

Hope it helps and Happy CRMing!

ABOUT THE AUTHOR:

clip_image001

Twitter: https://twitter.com/msdynamicsblog
LinkedIn: https://www.linkedin.com/in/deepesh-somani-00296932

Google Play Store:

https://play.google.com/store/apps/details?id=com.dynamicsofdynamicscrm.msdynamicsblog&hl=en

{Dynamics 365 Enhancements} Good reads from the CRM community

This blog is part of the series which I will use to cover all interesting enhancements coming in Dynamics 365.

People often ask me how can they start blogging and then keep maintaining to write. The trick is very simple!

clip_image001

In this post, I am going to cover the knowledge and good reads about Dynamics 365 from CRM community.

A great article from Nishant on Dynamics 365 Apps: https://nishantrana.wordpress.com/2016/11/03/create-apps-in-dynamics-365-using-new-app-designer-and-site-map-designer-in-dynamics-365/

Learn about the new Business rules visual designer here:

https://nishantrana.wordpress.com/2016/11/02/new-visual-designer-for-business-rules-in-dynamics-365/

You must have read about Editable grids, if not its summed up by really well here by Nishant:

https://nishantrana.wordpress.com/2016/11/01/quick-walkthrough-editable-grid-in-dynamics-365/

Fellow MVP Debajit has more interesting details to read here on Editable grids:

https://debajmecrm.com/2016/11/05/dynamics-365-quick-tips-rearrange-columns-on-the-fly-and-maintain-view-groupings-and-switch-display-mode-in-dynamics-365-editable-grids/

Following up, a set of new out of box actions that are now readily available for Dynamics CRM:

https://debajmecrm.com/2016/11/03/dynamics-365-new-features-explore-the-new-oob-actions-available-with-dynamics-365/

Very interesting read about Azure Logic apps by Simaranjit here:

https://crmazurecomponents.wordpress.com/2016/11/13/azure-logic-apps-twitter-to-facebook/

A look at preview feature for Organization insights here:

https://crmazurecomponents.wordpress.com/2016/11/03/dynamics-365-preview-feature-organization-insights-dashboard/

This blog from MVP Neil on Business process flows enhancements is not to be missed:

https://neilparkhurst.com/2016/11/06/dynamics-365-business-process-flows/

Do not forget, Public beta for Dynamics 365 SDK is released : https://marketplace.visualstudio.com/items?itemName=DynamicsCRMPG.MicrosoftDynamicsCRMDeveloperToolkit

Hope you liked the power of CRM community.

clip_image002

Hope it helps and Happy CRMing!

ABOUT THE AUTHOR:

clip_image001

Twitter: https://twitter.com/msdynamicsblog
LinkedIn: https://www.linkedin.com/in/deepesh-somani-00296932

Google Play Store:

https://play.google.com/store/apps/details?id=com.dynamicsofdynamicscrm.msdynamicsblog&hl=en

{Dynamics 365 Enhancements} Add Notification Recommendations to your Entity forms using script

This blog is part of the series which I will use to cover all interesting enhancements coming in Dynamics 365.

Scenario: On Account form, if user fills in the Telephone field – suggest a recommendation to set Contact preference by Phone field. If user selects yes, set Contact by Phone option to allow.

Scenario by Graphics:

· On change of phone field, CRM shows a recommendation tooltip:

clip_image001

· When you click the information icon, CRM gives you a recommendation:

clip_image002

· If you pick Apply, CRM will do the updating to the field as required:

clip_image003

Great isn’t it?

Here is the link describing the new Client side scripting function: https://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_addnotification

And here is the script for this one (Register it on change event of Phone field):

function addPhonePreferenceNotification() {

var myControl = Xrm.Page.getControl(‘telephone1’);

var telephone= Xrm.Page.data.entity.attributes.get(‘telephone1’);

var phonePreference = Xrm.Page.data.entity.attributes.get(‘donotphone’).getValue();

if (telephone.getValue() != null) {

var actionCollection = {

message: ‘Set the Contact Preference for Phone to Allow?’,

actions: null

};

actionCollection.actions = [function () {

Xrm.Page.data.entity.attributes.get(‘donotphone’).setValue(false);

myControl.clearNotification(‘my_unique_id’);

}];

myControl.addNotification({

messages: [‘Set Phone Preference’],

notificationLevel: ‘RECOMMENDATION’,

uniqueId: ‘my_unique_id’,

actions: [actionCollection]

});

}

else

console.log(“Notification not set”);

}// JavaScript source code

Hope it helps and Happy CRMing!



Check this out

ABOUT THE AUTHOR:

clip_image001

Twitter: https://twitter.com/msdynamicsblog
LinkedIn: https://www.linkedin.com/in/deepesh-somani-00296932

Google Play Store:

https://play.google.com/store/apps/details?id=com.dynamicsofdynamicscrm.msdynamicsblog&hl=en

{Dynamics 365 Enhancements}New Visual Designer for Business Process Flow in Dynamics 365

This blog is part of the series which I will use to cover all interesting enhancements coming in Dynamics 365.

In Dynamics 365 we have new visual designer for Business Process flows.

Here is a walkthrough for Business Process flow:

· Creating a new Sales Process on Lead entity:

clip_image001

· New editor will open up:

clip_image003

· Add Step to add further fields after selecting a Stage:

clip_image004

· After adding multiple steps in the stage, It will appear as below:

clip_image005

clip_image007

· For Adding a conditional branch Select +Add button and choose Add Condition:

clip_image008

· A + Tile will appear, Click on it:

clip_image009

· A condition box is visible (Right arrow is if condition is true part flow, wrong arrow shows condition is false part flow):

clip_image011

· Selecting true conditional flow:

clip_image013

· Click Add Stage to add a stage:

clip_image014

· Finally, will appear as below:

clip_image016

Want to document this?

No worries, just hit the snapshot button:

clip_image017

And here is an image for documentation available downloaded for you:

clip_image019

Great stuff Microsoft!

An old colleague of mine and well known Blogger on CRM Nishant has done a step of step for the new visual editor for Business rules here:

https://nishantrana.wordpress.com/2016/11/02/new-visual-designer-for-business-rules-in-dynamics-365/

Hope it helps and Happy CRMing!



Check this out

ABOUT THE AUTHOR:

clip_image001

Twitter: https://twitter.com/msdynamicsblog
LinkedIn: https://www.linkedin.com/in/deepesh-somani-00296932

Google Play Store:

https://play.google.com/store/apps/details?id=com.dynamicsofdynamicscrm.msdynamicsblog&hl=en

{Dynamics 365 Enhancements} Social pane improvements in Dynamics 365

This blog is part of the series which I will use to cover all interesting enhancements coming in Dynamics 365.

One of the most common requirement that is asked for CRM Social pane was ability to be able to order by different dates on Activity part of the social pane.

Let us have a look at Dynamics 365 social pane:

clip_image001

Notice the highlighted element available as an arrow on the social pane. This control now lets you order based on dates available on the activities.

What if I want to change it? Well you can. Just go to form editor, double click notes control and select Activity wall tab:

clip_image002

Great stuff, keep following to explore more interesting topics in Dynamics 365.

Hope it helps and Happy CRMing!



Check this out

ABOUT THE AUTHOR:

clip_image001

Twitter: https://twitter.com/msdynamicsblog
LinkedIn: https://www.linkedin.com/in/deepesh-somani-00296932

Google Play Store:

https://play.google.com/store/apps/details?id=com.dynamicsofdynamicscrm.msdynamicsblog&hl=en

Colored Grid for Dynamics CRM

A very common scenario is the need to be able to color CRM Grids.

Following add-on serves the purpose extremely well with great configuration and support for coloring either the back color or row color of any CRM gird:

Colored Grid for Dynamics CRM

banner

Colored Grid for Dynamics CRM Online/On-Premise addresses some of the following pain points for coloring CRM grids. Out of box CRM grids does not have the capability to show an interactive differentiation of records in terms of the key attributes. The add on provides an easy to configure solution that caters to this problem. Key features of this application are:

• Provides colored formatting for any entity and for any view. It also provides the capability of selecting the option set attribute on which basis the user wants to do the formatting.
• User can also choose whether to highlight the text color or the background color.
• Multiple configurations of colored formatting can be done. Like any other CRM entity they can be easily copied to another CRM instance using out of box import and export.
• Provides visual indicator to CRM users for relevant rows.

Add-on Link:Click here

capture

Text color option:

capture1

Hope it helps and Happy CRMing!

ABOUT THE AUTHOR:

clip_image001

Twitter: https://twitter.com/msdynamicsblog
LinkedIn: https://www.linkedin.com/in/deepesh-somani-00296932

Google Play Store:

https://play.google.com/store/apps/details?id=com.dynamicsofdynamicscrm.msdynamicsblog&hl=en

{Code Tip} Accessing fields in CRM header and footer using JavaScript

Many a times there is need to access CRM fields in javascript which are present in either header or the footer. Here are snippets to access fields for enable/disable, get/set and control visibility which exist in either header or footer of a CRM form.

Header Field Scripts:

//Set Enabled to True:

Xrm.Page.getControl(‘header_ fieldname’).setDisabled(false);

//Set Enabled to False:

Xrm.Page.getControl(‘header_ fieldname’).setDisabled(true);

//Set Visibility to False:

Xrm.Page.getControl(‘header_ fieldname’).setVisible(false);

//Set Visibility to True:

Xrm.Page.getControl(‘header _ fieldname’).setVisible(true);

//Get Attribute Value in Footer:

Xrm.Page.getControl(‘header _ fieldname’).getAttribute().getValue();

//Set Attribute Value in Footer:

Xrm.Page.getControl(‘header _fieldname’).getAttribute().setValue(VALUE);

Footer Field Scripts:

//Set Visibility to False:

Xrm.Page.getControl(‘footer_ fieldname’).setVisible(false);

//Set Visibility to True:

Xrm.Page.getControl(‘footer_ fieldname’).setVisible(true);

//Get Attribute Value in Footer:

Xrm.Page.getControl(‘footer_ fieldname’).getAttribute().getValue();

//Set Attribute Value in Footer:

Xrm.Page.getControl(‘footer_fieldname’).getAttribute().setValue(VALUE);

Hope it helps and Happy CRMing!


Check this out
About the Author:

clip_image001

Twitter: https://twitter.com/msdynamicsblog
LinkedIn: https://www.linkedin.com/in/deepesh-somani-00296932

Google Play Store:

https://play.google.com/store/apps/details?id=com.dynamicsofdynamicscrm.msdynamicsblog&hl=en

{Error resolution} Create Incident Error: The specified contact doesn’t belong to the contact that was specified in the customer field in Dynamics CRM 2015 and up

Error Description: in CRM 2015/2016 User can select contact and account on the Business process flow which are unrelated. When user hit save, reports an error “Invalid Contact – the specified contact doesn’t belong to the account selected as the customer Specific a contact that belongs to the selected account and then try again.”

In the scenario below, I have tried to Add contact “Allan Saddler” in the test CRM Data to A. Datum and I am presented with the error:

clip_image002

Error resolution:

In this case if the fields are to be filled in using Business process flow area only users need to be trained to only pick contacts which are related to the account.

An alternative solution is to remove Contact selection from Business process flow area and utilize CRM form instead. See in the below screenshot, Contacts are automatically being filtered for different accounts:

clip_image003

Changing the Account causes the filters to be applied again:

clip_image004

Hope it helps and Happy CRMing!


Check this out

About the Author:

clip_image001

Twitter: https://twitter.com/msdynamicsblog
LinkedIn: https://www.linkedin.com/in/deepesh-somani-00296932

Google Play Store:

https://play.google.com/store/apps/details?id=com.dynamicsofdynamicscrm.msdynamicsblog&hl=en