function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mercury HolidaysMercury Holidays 

INVALID_FIELD_FOR_INSERT_UPDATE only on some records

Hi,

I'm using the Kingswaysoft SSIS integration to import and update records in Salesforce. One step imports Opportunities and links them to exisitng Accounts and Contacts (we have Person Accounts).

However, some records fail with the dreaded INVALID_FIELD_FOR_INSERT_UPDATE error on ContactId. I can't work out why this happens, because many similar records in the same batch pass and are imported correctly with the Contact link.

I would appreciate some help identifying what the cause could be so I can fix it to always work for all reords.

Thanks
Danish HodaDanish Hoda
Hi there,
Plz check the data, it seems some Contact records are updating the 'Id' field.
Mercury HolidaysMercury Holidays
Hi,
I am not updating any Contact records. I am updating Opportunity records with ContactId to link them to contact. For some Opportunities it works, other not, even ones linking to the same Contact can produce different results.
KingswaySoftKingswaySoft
Hi, 

Please check if the second scenario described below applies to your case. 
https://help.salesforce.com/articleView?id=000327380&type=1&mode=1 (https://help.salesforce.com/articleView?id=000327380&type=1&mode=1)
Mercury HolidaysMercury Holidays
Hi,

Thank you for your reply. I thought that might be the case, but it only talks about allowing reparenting on Custom Objects. I am editing Opportunity, which is a standard object, and there are no Master-Detail relationships on Opportunity to anything. It has Lookups to Account and Contact Role, so I assume something is going wrong when it is trying to link to Contact Role?