web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Kishor Kumar Profile Picture
    3,710 on at

    Hi Kiran Check this link

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

  • Verified answer
    Somesh2207 Profile Picture
    1,563 on at

    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

  • Verified answer
    kiran_rajput Profile Picture
    775 on at

    Thank you somesh

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans