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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,135)