Nov 19, 20242:02 AM - edited Nov 19, 20242:02 AM
Participant | Gold Partner
add Label (do not overwrite existing label)
SOLVE
is there a way to ADD a label to an already existing association
for example. i have JOHN, he associated to my record with Label "contact person" now via custom code ADD another label to the same record. example "photographer" im assigning labels via custom code action all the time. but have to do complicated checks to see whether John is both contact person and photographer. is there a way to ADD/Patch another label?
It seems we can only do a PUT method. There was no PATCH method provided for this.
As a workaround, what I do is I simply add the existing associationTypeId (which will get overwritten), and include another associationTypeId that we want to add, just like this:
[
{
"associationCategory": "USER_DEFINED",
"associationTypeId": 247 // For example if this is the Id for "Contact Person"
},
{
"associationCategory": "USER_DEFINED",
"associationTypeId": 232 // We just add another Id for "Photographer"
}
]
Was I able to help answer your question? Help the community by marking it as a solution.
It seems we can only do a PUT method. There was no PATCH method provided for this.
As a workaround, what I do is I simply add the existing associationTypeId (which will get overwritten), and include another associationTypeId that we want to add, just like this:
[
{
"associationCategory": "USER_DEFINED",
"associationTypeId": 247 // For example if this is the Id for "Contact Person"
},
{
"associationCategory": "USER_DEFINED",
"associationTypeId": 232 // We just add another Id for "Photographer"
}
]
Was I able to help answer your question? Help the community by marking it as a solution.
Nov 19, 20242:51 AM - edited Nov 19, 20242:52 AM
Participant | Gold Partner
add Label (do not overwrite existing label)
SOLVE
HI WesQ, thx, this what im currently doing, but i first then have to determne what the "current" label/s is. (there are many), filter/loop through them all, because one contact can have more than one label ALREADY. then use the results to add my Added label with all the previous ones also. I was just hoping i could just keep the contact with it's current labels, en "Patch" another label also. but thank you, you confirmed this is not possible, IF I understood you correctly....