cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnBrown
Frequent Visitor

reating a ActivityParties for a Custom Activity inside a PCF

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. 

"An error occurred while validating input parameters: Microsoft.OData.ODataException: An undeclared property 'partyid_systemusers' which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values. "

 

 

 

 

 

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?

0 REPLIES 0

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,341)