Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Shared Variable ?

(0) ShareShare
ReportReport
Posted on by 775

hello,

How two plugins are connecting each other by shared variable. In which the Create and Update plugin.

thanx...

*This post is locked for comments

  • Verified answer
    kiran_rajput Profile Picture
    kiran_rajput 775 on at
    RE: Shared Variable ?

    Thank you somesh

  • Verified answer
    Somesh2207 Profile Picture
    Somesh2207 1,563 on at
    RE: Shared Variable ?

    Hi kiran_rajput,

    Shared Variables feature is used to communicate information between a plug-in registered for a pre-event and a plug-in registered for a post-event. this is one of the scenarios

    Instead of storing the values in a custom attribute you can store the value in a context variable. This is then available in the Post event for use. It is possible to read/write data into SharedVariables of context.

    if you are looking to use the shared variables between plugins, that are not in the same execution pipeline, the context will NOT contain the shared variables. So in your case, if you Add shared variables on Create plugin and want to use it in Update plugin, shared variables will not be availalble since they are not in the same event pipeline.

    Typically we use Shared variables in differenct execution stage on the same event. Like pre-event and post-event of create of record.

    Sample

    Adding to Shared Variables: 

    Pic1292017_5F00_7.png

    Reading from Shared Variables

    Pic1292017_5F00_7.png

  • Kishor Kumar Profile Picture
    Kishor Kumar 3,702 on at
    RE: Shared Variable ?

    Hi Kiran Check this link

    community.dynamics.com/.../use-of-shared-variables-in-plugins

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans