Post

1 follower Follow
0
Avatar

C# examples are incorrect

On the page https://developers.podio.com/clients/dotnet, under "Creating and updating items", there exists this code:

// Contact field
var contactField = item.Field<ContactItemField>(appField.ExternalId);
contactField.ExternalId = appField.ExternalId;
contactField.ContactIds = [123, 456]; // Profile ids of users and/or contacts
item.Fields.Add(contactField);

The line that sets ContactIds to [123, 456] isn't valid C# code. Could you please fix this, and describe a way of setting ContactIds that will actually compile and work using the .NET client library?

Thanks!

Dan Vanderboom Answered

Please sign in to leave a comment.

2 comments

0
Avatar

Hi Dan,

We will get the example updated. It should just be an array of integers (I'm not a c# guy so I'm not sure of the actual syntax). I hope that helps.

/Andreas

Andreas Haugstrup Pedersen 0 votes
Comment actions Permalink
0
Avatar

I figured it out! This line works:

contactField.ContactIds = new List<int> { 123 };

... where 123 is the ProfileID of the contact.

Dan Vanderboom 0 votes
Comment actions Permalink