Task and Phone Activity Created through the Social Pane CRM 2013 RRS feed

  • Question

  • Hi there,

    I have a plugin customization that updates the organization field on the activity
    entity if the Regarding field has a parent organization. The plugin gets fired
    on the PostCreate and looks for if the Regarding Object Id is populated and
    then gets parent organization id and populates the activity entity. The plugin
    works fine when creating Task, Phone from Activity Form but not from the Social
    Pane on the Contact entity.  My plugin is looking for regardingobjectid
    field. When Task or Phone Activities are created from the Social Pane it looks
    like the regardingobjectid is not been passed in the CRM pipeline.

    What am I
    missing? Here is my plugin code

    static string Customer = "regardingobjectid";

         private static string ParentCustomer =

         public override void HandleAfterOpCreate()




                 if (!






                 if (this.PluginExecutionContext.MessageName
    == MessageName.Create)




    id = this.OutputID;

    customerId = ((EntityReference)this.InputTargetEntity.Attributes[Customer]).Id;

     ActivityService.UpdateActivity(id, customerId, this.OrganizationService,
    this.TracingService, this.PluginExecutionContext.PrimaryEntityName.ToLower());




             catch (Exception ex)


     this.TracingService.Trace(this.ToString() + " {0}",
    "Exception:  {0}", ex.ToString());




    • Edited by SPCRM2011 Thursday, March 6, 2014 5:10 PM
    Thursday, March 6, 2014 5:08 PM

All replies