I am attempting to create activity parties for a custom activity in a PCF using the webApi. Unfortunately, I continue to encounter an error around the activity parties.
CreateMessage(description:string, title:string, userId:string, contactId:string){
var activityParties = []
// From - Participation Type Mask = 1
let Sender:ComponentFramework.WebApi.Entity = {};
Sender["partyid_systemuser@odata.bind"] = "/systemusers(" + userId + ")";
Sender["participationtypemask"] = 1;
activityParties.push(Sender);
// To - Participation Type Mask = 2
let Receipent:ComponentFramework.WebApi.Entity = {};
//Receipent["LogicalName"] = "activityparty"
Receipent["partyid_contact@odata.bind"] = "/contacts(" + contactId + ")";
Receipent["participationtypemask"] = 2;
activityParties.push(Receipent);
let message:ComponentFramework.WebApi.Entity = {};
message["description"] = description;
message["subject"] = title;
message["activity_pointer_new_Message"] = activityParties;
this.props.WebApi.createRecord('new_message', message).then(
function success(message:any) {
console.log("Message has been created");
},
function Error(e:any) {
console.log(e.message);
}
)
}
Any ideas on what I am doing wrong here?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
6 | |
5 | |
5 | |
3 | |
2 |