Home > CRM 2011, JScript > Limitation of OData End Point – Setting Activity Parties

Limitation of OData End Point – Setting Activity Parties


In one of my requirement, I had to create an “Appointment” record programmatically using Jscript by populating field ‘required attendees’ (i.e., ActivityParty) to it.

I followed below steps to complete the requirement

  • Created the “Appointment” record first
  • Added 2 contacts as “Required Attendees” to Appointment, for which I used below code and called it 2 times since I need to create 2 activity parties

var activityParty = new Object();

activityParty.PartyId = {

Id: participentId,

LogicalName: participentLogicalName


activityParty.ActivityId = {

Id: activityId,

LogicalName: “appointment”


activityParty.ParticipationTypeMask = { Value: 5 }; //5 = Required Attendees

var activityParty = createRecord (activityParty, “ActivityPartySet”);

Issue I faced :-

  • The problem I faced was,
    • only one “Contact” added as “Required Attendees” (i.e., Only 1 Activity Party is creating) instead of 2
    • When I debug the script and DB, I observed that 1st activity party is getting created initially but once after the 2nd activity party created, the first one is getting deleted

Reason & Workaround :-

  • Later I came to know that, this is the limitation of OData end point.
  • As a workaround, I registered a Plugin on post create of “Appointment” and added “Activity Parties”


  1. No comments yet.
  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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: