Closed sadiqk2 closed 4 weeks ago
$contact = new Contact($connection); $contact->FirstName = "firstname" $contact->Account ="ID" $contact->Phone = "mobile"; $contact->Initials = "testing"; $contact->BusinessFax = "testing"; $contact->Mobile = "testing"; $contact->Email = "testing"; $contact->JobTitleDescription = "testing"; $contact->ID = $contact->findId($contact->FirstName, 'FirstName') ?? $contact->ID; $contact->save(); how to save or update if contact with same is already on exact associated with other relation
in this case it throws error not linked contact group
You should not rely on the name (or any other field that is not 100% guaranteed unique for the user) to identify. Either you keep track of the ID of the contact when creating (so you can refer to that specific ID without having to search) or, if that is not possible, you use a more specific set of filters (like a match on email + first name + last name).
You should not rely on the name (or any other field that is not 100% guaranteed unique for the user) to identify. Either you keep track of the ID of the contact when creating (so you can refer to that specific ID without having to search) or, if that is not possible, you use a more specific set of filters (like a match on email + first name + last name).
is it possible to delete all first then add them again ,the reason data is not properly synced
Yes. Just fetch them all and loop through them with a delete request. There is no bulk delete as far as I know.
Yes. Just fetch them all and loop through them with a delete request. There is no bulk delete as far as I know.
is a way to dump all guids from exact and have it on app properly? as deletion is somthing somtimes breaking if the contact are added as main contact
Not that I know. Think through the UI or through the API is equally a lot of work and steps to delete a big datasets.
$contact = new Contact($connection); $contact->FirstName = "firstname" $contact->Account ="ID" $contact->Phone = "mobile"; $contact->Initials = "testing"; $contact->BusinessFax = "testing"; $contact->Mobile = "testing"; $contact->Email = "testing"; $contact->JobTitleDescription = "testing"; $contact->ID = $contact->findId($contact->FirstName, 'FirstName') ?? $contact->ID; $contact->save(); how to save or update if contact with same is already on exact associated with other relation