Open gregarican opened 3 years ago
I think I see now. I need to change my code to this, correct?
var personField = new StringCustomField(armsId); person.CustomFields[armsIdFieldKey] = personField;
When you want to update a custom field which is a person or an organization, you have to pass the ID when you want to update it. See the example below:
var testDeal = await client.Deal.Get(1);
var personField = testDeal.CustomFields["hashOfMyCustomField"]; // null or PersonCustomField
var dealToUpdate = testDeal.ToUpdate();
dealToUpdate.CustomFields["hashOfMyCustomField"] = new LongCustomField(627);
await client.Deal.Edit(testDeal.Id, dealToUpdate);
So I have a routine in my project that is attempting to modify the value of a specific a PersonCustomField. The value associated with the key I need updating is a string, however. Looking at the available functionality, it appears as if I can only set the value to be a numeric datatype. Unless I'm missing something in my logic. Sample code below.
Any suggestions as to how I best handle this? Ultimately it would be best if I could define the datatype when I am initializing the new PersonCustomField. But I didn't see how to do this.