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:

  1. Does the site guest user have API enabled in the settings? - Yes
  2. Does the guest profile have edit access to Custom1__c object? - Yes (has all the access checkboxes checked)
  3. 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)
  4. Does the guest profile have access to the Visualforce page and Apex controller ? - Yes
  5. 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.
  6. 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.

  • Are you able to edit field/record using System Administrator in Prod org? Is there any "workflow rule field update" in Production Org which is making that field as blank? – Devendra Oct 25 '16 at 5:36
  • Yes, I can edit the field as a System Admin. There is no workflow rule for that field update. – codeinprogress Oct 25 '16 at 5:46
  • Have you used some JS hardcoded tricks? Is your production and Sandbox on same salesforce API version? – Pranay Jaiswal Oct 25 '16 at 7:07
  • tried looking at debug logs for site user? – Raul Oct 25 '16 at 8:24
  • The debug logs do not display anything wrong and there are no hardcoded JS tricks I am using. – codeinprogress Oct 25 '16 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.