CRM 2015 To get the Caller Origin in Plugin RRS feed

  • Question

  • Hi,

    I have a plugin where i am checking the depth property 

        if(depth > 1)


    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 -


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

    Any help would be appreciated


    Friday, August 12, 2016 6:52 AM