0
votes

I am using salesforce iOS sdk in my project. I am creating a record in my local db and update another record . Now i am trying to sync up my records to salesforce server. I am getting error.

"soupName" : "Attachment" } cause:Server call for sync up failed errorError Domain=https://ev.cs16.my.salesforce.com/services/data/v39.0/sobjects/Attachment/00Pf00000030kVhEAI Code=400 "(null)" UserInfo={error=(         {         errorCode = "INVALID_FIELD_FOR_INSERT_UPDATE";         fields =         (             ParentId         );         message = "Unable to create/update fields: ParentId. Please check the security settings of this field and verify that it is read/write for your profile or permission set.";     } )}

1

1 Answers

1
votes

Looks like the underlying Salesforce error (extracted from your question) is:

Unable to create/update fields: ParentId. Please check the security settings of this field and verify that it is read/write for your profile or permission set.

Basically this just means that the user you are performing the insert operation with has no permissions to set the ParentId.

If you are trying to change the ParentId in a Master-Detail relationship, make sure that the Allow reparenting option is activated in the Master-Detail settings.