DYNAMICS 365-LEARN TO SEND AN EMAIL ON RECORD SHARE

One of the common things people do in Dynamics365 is share a record such as Lead, Opportunity etc. with other users. So how does a user know that a record has been shared with him/her?

Dynamics365,CRMservices,MicrosoftGoldPartner,POwerBI,Email,

This was asked by one of our customer’s. They said “I cannot call and tell that I have shared a lead with you”. Since emails are an integral part of most users’ days, it makes sense that Dynamics365 should have the capability to send an email notifying the user that record has been shared with him/her. But sadly there was no out-of-box configuration that allows such notification in Dynamics365.

To solve this, we had to look at our good friend ‘plugin’, so we decided to write a plugin in order to send an email notification when a record is shared.

Sending email was the easy part but there was very little information that we found on which event to trigger the plugin and how to get the details of users with whom the record is being shared.

Solution

Create a plugin project as you would normally do. We used the Dynamics365 Developer toolkit to do the same. Whenever a record is shared “Grant Access” message is fired so check if the context message is Grant Access (i.e. plugin is executed for ‘Grant Access’)

Dynamics365,Dynamics365services,SoluzioneITServices,microsoftgoldpartner, Mail

Get the user who has shared the record by checking the context under which the plugin is running.

Dynamics365,Dynamics365services,Mail,soluzioneIT Services,Email

Now the tricky part – Get the user with whom the record is being shared. This is found under the “Principal Access” parameter in the plugin context.

Dynamics365,Dynamics365CRM,Microsoftgoldpartner,soluzione IT Services

In our case as Lead was being shared so get the Lead record that is being shared.

DYNAMICS 365-LEARN TO SEND AN EMAIL ON RECORD SHARE

Now we have the user who shared the record, user with whom the record is shared and the record that is shared, so you can now simply create an email message and send email notification from plugin.

Although simple but it is a really handy solution for a common requirement.So that’s it from Soluzione. This is our first blog and hope you like it.If you want additional services then check out Soluzione Digital Services.

 

Leave a reply

ABOUT US

Soluzione is Microsoft Certified Gold Partner and expert in MS Dynamics 365. We are continuously delivering high quality solutions to various industries and are experts in Microsoft Stack. We also offer Application Development using Open Source Technologies. In addition, we also provide Digital Marketing Services.

 

SEARCH

Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

RECENT BLOGS

Archives

F
Contact Us

Verification Image

Enter number from above: