Finding the Plugin CallerOrigin in MS CRM 4.0

Proposed Answer Finding the Plugin CallerOrigin in MS CRM 4.0

  • Monday, July 30, 2012 4:49 PM
     
     

    Hi,

    I have the requirement to find the CallerOrigin in MS CRM 4.0.

    Once I click on ISV Button, the custom aspx will get load and create the new record and openS the newly created record using the below code. while updating the record how to identify CallerOrigin in the plug-in, I am using

    if(Context.CallerOrigin.ToString() == "Microsoft.Crm.Sdk.WebServiceApiOrigin")

     but it is returning false because the CallerOrigin property value is ApplicationOrigin

    string open = "<script>java_script_:window.open('" + serverUrl + "/OrgInc/userdefined/edit.aspx?id={" + infusionid + "}&_CreateFromType=10009&etc=10049', '_blank','height=650,width=950,titlebar=no,top=175,left=325 ,

    scrollbars=no,status=yes,resizable=yes');</script>";
    Response.Write(open);

    How to diffrentiate the page opened using window.open and form opened in MS CRM in the plug-in?

    Thanks

    Srikanth Reddy







All Replies