function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ManishaShar12ManishaShar12 

Cannot create a case through vf in community

Hi all,

We created a visual force page (screen shot attached) to facilitate community guest user to create a case. But, we are not able to create a case by clicking 'Contact Us' button on this page.

The case creation through this VF page is working fine internally in sandbox but not from Community.


<apex:page standardController="Case" extensions="CaseCreation" >
    <style>
        body  .big_btn{background: rgb(228, 0, 70);border:1px solid rgb(228, 0, 70) !important;transition: all 0.5s;color: #fff;padding: 22px 30px;border: none;font-size: 14px;text-transform: uppercase;letter-spacing: 1px; }
        body  .big_btn:hover{background:#fff;color: rgb(228, 0, 70);border:1px solid #ccc  !important;}
        table.list {
    border-width: 0 !important;
}
tr.dataRow.last td {
    border-bottom-width: 0 !important;
}
        }
.brandQuaternaryBgr {
    background: #FFF !important;
}
    </style>
    <apex:form >

        <apex:pageBlock >
 
             <apex:pageBlockButtons  location="bottom" >
              <apex:commandButton value="Contact Us" styleClass="big_btn" action="{!save}" />
              </apex:pageBlockButtons> 
            <div style="text-align:center;font-size:18px;">
               <apex:outputText value="Can't find what you're looking for" /> 
           </div>
            <div style="text-align:center;font-size:13px;">
               <apex:outputText value="Contact customer support using the form below" /> 
           </div>
           
            
           <apex:pageBlockSection columns="1"  >
               <div >
               <apex:inputField label="E-Mail" value="{!CaseObject.E_Mail__c}" style="font-size:13px; width:100%;line-height:30px;border:none" required="true"/>
 </div>
               <apex:inputField label="First Name" value="{!CaseObject.First_Name__c}" style="font-size:13px; width:100%;line-height:30px;border:none"  required="true"/>
               <apex:inputField label="Last Name" value="{!CaseObject.Last_Name__c}" style="font-size:13px; width:100%;line-height:30px;border:none"  required="true"/>
               <apex:inputField label="Reason For Contacting Us" value="{!CaseObject.Type}" style="font-size:13px; width:100%;line-height:30px;border:none"  required="true"/>
               <apex:inputField label="Symptom" value="{!CaseObject.Symptom__c}" style="font-size:13px; width:100%;line-height:30px;border:none"  required="true"/>
               <apex:inputField label="Brief Description" value="{!CaseObject.Description}" style="font-size:13px; width:100%;line-height:30px;border:none"  required="true" />
               

               
                                                                           
               
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>


Please help us.
Gabriel C FerreiraGabriel C Ferreira
Have you checked if the guest profile for community have permission to create cases?

Go to Setup -> Profiles -> [community name guest user] and check if the profile have permission to create cases.