Cause
Salesforce is trying to edit a record as designed in your form but has encountered a problem. This usually will affect all field officers who are using that form to update an existing record.
An Error 00004 with this message "System.SObjectException : Field PARENT_RECORD__c is not editable" is often due to the form trying to update a record with a master-detail relationship. Note that PARENT_RECORD__c can be any API name depending on how you have actually named your Master-Detail relationship. However this is not permitted because the field is set as Non-reparentable, meaning that the child record cannot change parents.
Even if your form and job design is such that the SAME value is inputted in your form (so the parent record didn't change when the field officer is completing the form and you had no intention of changing it), TaroWorks currently operates in such a way that attempts to write to the field, thus violating Salesforce rule.
Solution
To resolve this issue:
- Login as Administrator, go to salesforce setup and find the child object and the Master-Detail field that matches the field name.
- Edit that Master-Detail field, change it to allow Reparenting.
- Tell your field officers to sync again.
Note that your salesforce users will have to be careful NOT to accidentally change the parent record without good reason. The way to control this is by creating different page layouts for different user profiles and then making the field read-only. Please see Salesforce.com documentation for help with this step.
Prevention
- As a good practice, create your master-detail relationships to be reparentable at the beginning.
Comments
2 comments
Does this mean that we cannot use TaroWorks to update records of standard objects which are child in a master-detail relationship? For example, the Order Product object is child to Price Book Entry and that relationship cannot be made to allow reparenting.
Even if we have no intention of ever modifying that field value, we will not be able to edit that object. If that is the case, this is a huge design flaw and needs to be highlighted for all standard objects which are affected.
Hi Patrick, great question! We are adding this functionality in conjunction with simplifying Field mapping to our Roadmap. We've compiled a list of Salesforce Standard Objects that mobile users (partner users) can Create, Read or Edit. Here's the full list https://taroworks.zendesk.com/hc/en-us/articles/360000701423
If you'd like to share the details of your use case with TaroWorks support, we can invest time in working with you on a way forward in the mean time.
Please sign in to leave a comment.