0

I have below requirement to Create a VF page. I created a custom object called DormsApplicants__c There are several fields but for the purposes of the example we will use only one field called First_name__c.

My main need is to create a VF page that will be available to people outside the organization (i.e. customers) who can enter data into the form and then create a record in the custom object DormsApplicants__c. For this purpose I created a website (SITE.COM) and then created a VF page (called TEST) I defined this page (TEST) as a home page on the site.

This is my page:

<apex:page standardController="DormsApplicants__c" sidebar="false">
<apex:form id="theForm">
<apex:pageBlock title="TEST">
    <apex:inputText title="TEXTBOX1" label="TEXTBOX2"  value="{!DormsApplicants__c.First_name__c}"/>
    <apex:commandButton value="save" action="{!save}"/>
    </apex:pageBlock>
</apex:form>

Image A1 - This is what users see outside the organization.

When the user tries to click "save" he gets the following error:

Image B1 - error on save

Of course no record is created. I'd love to hear what the problem is?

user3617337
  • 23
  • 1
  • 8
  • This is because of permission for the DormsApplicants__c object and its Fields. – Sudarshan Mar 17 '18 at 19:49
  • If you have created a Force.com site in that Click on the Profile Its is suffixed with "Guset.. " Click on it Check The Field Level Permission and Object Level Permission. If it is not Provided Check the Check box for READ, CREATE etc, Finally do the same for the Site Contact User Profile – Sudarshan Mar 17 '18 at 19:52
  • Can you be a little more specific. Where do I set the permissions for a guser user? – user3617337 Mar 19 '18 at 19:02
  • Go to your force.com site that you have created and click on it in detail page On Top there are button View Accessibility It will takes you the guest profile – Sudarshan Mar 22 '18 at 05:33

0 Answers0