Get and update objects associated with companies


#1

As a dedupe app, we're trying to build a company dedupe. Of course, this will only work if we can get and update the associations (tasks, schedules, tickets, log activities, contacts, attachments, notes, emails, tickets, deals and calls) to the newly merged master company.

My question is, what's the easiest way to get the above objects associated with company and then update their association to another company id?

So the two endpoints needed for each object (tasks, schedules, tickets, log activities, contacts, attachments, notes, emails, tickets, deals and calls) are:

  • Get list of said objects by company id
  • Update association of said objects to another company id (assuming this has to be done one by one for each object found in the GET)

Any help with this would be very much appreciated. This is going to be a big job.


#2

Hi @dedupely,

The first endpoint exists in the exact form you're looking for:

The second can be done by updating the associations of each engagement with the ID of the new company record by updating each engagement:


#3

Wow crazy!! This makes it pretty simple. And this works for all attached/associated items for companies?


#4

Hi @dedupely,

These methods work for all engagements, yes. Things like notes, meetings, calls, tasks, etc.


#5

Nice! That's too cool. Thanks