Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

Dynamic CRM Shared Variables Thread Safety

$
0
0

I have a Dynamic CRM plugin which has two steps. One is running on pre-create and second is running on post-create. I have used Shared Variables. I am setting the values in shared variables on pre-create and retriving the values on post-create.

Now is it thread safe. If two users trigger the same plugin in same org would not they over write each others data?

Set values in Shared Variables:

context.SharedVariables.Add("statecode", stateCodeValue);
context.SharedVariables.Add("statuscode", statusCodeValue);

Get values from Shared Variables:

int statecode = (int)context.SharedVariables["statecode"];
int statuscode = (int)context.SharedVariables["statuscode"];

Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>