I have a Visualforce page on a force.com site which is suppose to update a custom field (type text) Field1__c of a custom object Custom1__c. It works perfectly on Sandbox, but when I deployed it to production, the field no longer gets updated. There is no Apex error cause the page renders fine after the button is clicked.
Here are couple of things I cross checked in case I missed anything:
- Does the site guest user have API enabled in the settings? - Yes
- Does the guest profile have edit access to Custom1__c object? - Yes (has all the access checkboxes checked)
- Does the guest profile have edit access to the Field1__c field? - Yes (all the fields in the Custom1__c object have been given read and edit access for the guest user)
- Does the guest profile have access to the Visualforce page and Apex controller ? - Yes
- Are the object record types accessible to the site guest user? - Yes, the guest user has access to both the record types for the object.
- Is there any validation rule that is stopping the field from getting updated? - No, there is no validation rule for that field.
When I go to any record of Custom1__c object and edit that field manually, it works. So there is no issue with the field. I am confused on why the field won't update on Production but works on Sandbox force.com site. I am sure its a permission and access issue in production but I am not able to find it.
Any idea on what might be happening? Thanks.
********** Edit ************
So I created a test controller and test vf page just to update that custom field and deployed it to production and it still does not work. This means something is off with the field.