Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

CRM 2015 To get the Caller Origin in Plugin

$
0
0

Hi,

I have a plugin where i am checking the depth property 

    if(depth > 1)

     return;

since i do not want this plugin to get fired from any other plugin, However i have custom workflow through which i need to call this plugin, but because i have checked the depth property, it does not run (since the depth is 2 in this case)

i also tried the below code to find who triggered the plugin -

context.ParentContext.GetType().ToString()

However the parent context is same when fired through workflow or plugin  - "Microsoft.Crm.Sandbox.SandboxPluginExecutionContext"

Any help would be appreciated

Thanks



Viewing all articles
Browse latest Browse all 8223

Trending Articles



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