Advertisements
Home > CRM 2011, Plug-Ins > CRM 2011 – Team sharing in Plug in
  1. March 18, 2012 at 5:29 AM

    I am writing the below code to assign a account record to a team . I am getting an error on the last line “The given key was not present in the dictionary.” .

    Could you please tell me where is the problem ?

    Guid TeamID = new Guid(“9e4c4497-2811-e111-bcdf-00155d017a04”);
    Guid accountID = new Guid(“50345443-8a70-e111-a46f-00155d017a04”);

    AssignRequest assignRequest = new AssignRequest()
    {
    Assignee = new EntityReference
    {
    LogicalName = “team”,
    Id = TeamID
    },

    Target = new EntityReference(“account”, accountID)
    };

    service.Execute(assignRequest);

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: