locked
crm 2011 plug-in callerorigin RRS feed

  • Question

  • I've foundout callerorigin is removed from 2011.

    Is there a way in the plug-in to identify who triggered the plug-in like web application/WCF etc.

    We have a scenario where the web app does validation before it calls the plugin.

    So in the plugin we dont want to double validate if it's coming from webapp, only if it is coming from CRM UI we want to do the validation.


    Padmakar - http://gpadmakar.blogpost.com
    Monday, May 16, 2011 2:12 AM

Answers

  • Hi Padmakar,

    AS Callerorigin is deprecated in CRM 2011 I would do the following thig to resolve this issue

    • Create a  dummy attribute in CRM
    •  if any manipulation is happening on the CRM from , on Save of the Form i would set the value this dummy attribute,
    • I would check the this  attribute during plugin , if this attribute has value then it has called from CRM UI  if not is has come from NON CRM UI like from web services.,

    Hope this will resolve your issue.

     

    Thanks!


    Siva Polisetty http://dynamicscrm2011.wordpress.com If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"
    Monday, May 16, 2011 2:26 AM

All replies

  • Hi Padmakar,

    AS Callerorigin is deprecated in CRM 2011 I would do the following thig to resolve this issue

    • Create a  dummy attribute in CRM
    •  if any manipulation is happening on the CRM from , on Save of the Form i would set the value this dummy attribute,
    • I would check the this  attribute during plugin , if this attribute has value then it has called from CRM UI  if not is has come from NON CRM UI like from web services.,

    Hope this will resolve your issue.

     

    Thanks!


    Siva Polisetty http://dynamicscrm2011.wordpress.com If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"
    Monday, May 16, 2011 2:26 AM
  • Thanks Siva.

    I already thought about that.

    But it would be useful if there is a way of not creating extra attribute.


    Padmakar - http://gpadmakar.blogpost.com
    Monday, May 16, 2011 3:24 AM
  • Hi Padmakar,

    Thanks for your quick reply on this, i don't think there any other way to resolve this issue , need to proceed with the custom approach only .SDK has not given any other facility for this.

    Thanks!


    Siva Polisetty http://dynamicscrm2011.wordpress.com If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"
    Monday, May 16, 2011 3:55 AM
  • How about initiatinguserid in the plug-in where we can identify if the request coming from web user?
    Padmakar - http://gpadmakar.blogpost.com
    Wednesday, May 18, 2011 1:03 AM
  • Hi padmakar,

    Initiatinguserid --> gives under which account plugin pipeline is getting executed. This doesn't gurantee that the requesting is coming from the  web user (CRM UI).

    you can play a bit aournd on this writing one sample test plugin to test this feature,(in general intiainguserid is the user underwhich the crmweb is running) you can check this as i said.

    Thanks!


    Siva Polisetty http://dynamicscrm2011.wordpress.com If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"
    Wednesday, May 18, 2011 1:35 AM
  • Hi,

    if your plugin is running synchronously, then you could try this:

    • HttpContext.Current.Request.Url.ToString();

    then you know if you are running from a CRM web page or your own web app by looking at the URL.

    Friday, May 20, 2011 11:42 AM
  • Tuesday, February 26, 2013 3:10 PM