Linking a custom object to company using externalCompanyId

peteaxtell
Level 1

Linking a custom object to company using externalCompanyId

When linking a lead to a company, externalCompanyId is used. This means when adding a contact from CRM (via the web API), I can specify the CRM accountid rather than having to find the marketo company id for the account first.

 

I have created a custom object, but cannot link to company based on externalCompanyId, only id. This means for each custom object, I will have to get the id for the company first before creating/updating the custom object, rather than specifying the externalCompanyId and allowing Marketo to handle the lookup, as is the case with leads.

 

Any suggestions?

2 REPLIES 2
Tom_liolios2
Level 1

Re: Linking a custom object to company using externalCompanyId

Hi there,

 

Our team is running into the same issue. We're trying to link a Custom object to Company by externalCompanyId, but unfortunately this does not seem to be possible. Marketo's UI doesn't offer the possibility of linking with externalCompanyId, and the API gives the following error: 

 

            "code""1003",
            "message""Linked field is not valid"

 

Doing a lookup on the company's 'Id' first seems a waste of time, there must be a better way to approach this. I was wondering if you have found a solution?

SanfordWhiteman
Level 10 - Community Moderator

Re: Linking a custom object to company using externalCompanyId

I think the key is that while externalCompanyId is immutable in-place, it's not guaranteed to represent the same Company over the lifetime of the database (i.e. if you del and reinsert).