Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
In continuation of advanced plugin concepts part 1, in this post, we’ll discuss shared variables in ms CRM plugins and how to use them. We’ll also discuss user impersonation in plugins and how we can use it.
Also read: What is Microsoft Dynamics 365?
1. Shared Variables
Microsoft Dynamics 365 Customer Engagement platform and the execution pipeline provides the ability to pass data from one plug-in to another through an IPluginExecutionContext property called SharedVariables. This property is a collection of key/value pairs which developers can use to share data between plug-ins which are registered on both the pre and post events.
Shared Variables are useful for sharing the data during complex Plug-in development by sharing the data between Plugins registered on both the pre and post events.
Any value stored in the Plug-in context of Pre-event will be available in the Post-event of the Plug-in. This way, we can avoid storing the values in a custom attribute. Certain data validation which needs to be done at post-event can be achieved by passing the value from Pre-event of the Plug-in.
Also Read: Impersonation in Dynamics 365 Plugins
Test Case: For a demo, let’s say We want to check if the contact being created is duplicate i.e. contact exists with same first name and last name in Customer Engagement. If it exists, on post-operation, we want to mark the contact status duplicate. [Read More]
Business Applications communities