Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a site in which I need the update the existing record values in Case object,which as three sections. The first two section are read only and in third we need to update the values. I can able to edit and update the value in vf page but when it come to site i am getting the third section also in read only mode, i can't able to edit or update the fields.

Image1 is VF page:enter image description here

Image 2 is Site:enter image description here

Apex Class:
public class Bigw_Noshow_Update
       public List<Case> case_update;

    public Id caseId {get;set;}
    public Case cases {get;set;}
  public Case case_record{get; set;}
    public String recordID {get; set;}
     public PageReference pr{get;set;}
   /* public Bigw_Noshow_Update(ApexPages.StandardController controller) 

    public Bigw_Noshow_Update(ApexPages.StandardController controller)
    cases =new Case();
    recordID = ApexPages.CurrentPage().getparameters().get('id');
   List<case>  case_record= [SELECT Id,Full_Name__c, Resolution__c,Email_Address__c, Reason__c, Response_Status__c,Resolution_Comments__c FROM Case WHERE id=:recordID LIMIT 1];

     public pageReference updates()
        update case_record;

        pr = new PageReference('/'+recordId);
        return pr;

VF Page

<apex:page standardController="Case" extensions="Bigw_Noshow_Update" showHeader="false" sidebar="false">

<apex:form >
 <apex:pageBlock >
 <apex:pageBlockSection columns="2" title="Case Information">
  <apex:outputField value="{!case.Full_Name__c}" />
  <apex:outputField value="{!case.Email_Address__c}" />
  <apex:outputField value="{!case.Priority}" />
  <apex:outputField value="{!case.Origin}" />
  <apex:outputField value="{!case.Status}" />
  <apex:outputField value="{!case.Subject}" />
  <apex:outputField value="{!case.Number_Pallets_Cartons__c}" />
  <apex:outputField value="{!case.Description}" />
  <apex:outputField value="{!case.Event_Number__c}" />
  <apex:outputField value="{!case.XD_FD__c}" />
  <apex:outputField value="{!case.Type}" />
  <apex:outputField value="{!case.Resolution_Comments__c}" />
 <apex:pageBlockSection title="PO Information" >

  <apex:outputField value="{!case.PO__c}" />
  <apex:outputField value="{!case.ContactId}" />
  <apex:outputField value="{!case.Distribution_Centre__c}" />
  <apex:outputField value="{!case.Vendor_Number__c}" />
 <apex:pageBlockSection title="Other Information">  
  <apex:inputField value="{!case_record.Resolution__c}" />
  <apex:inputField value="{!case_record.Reason__c}" />
   <apex:inputField value="{!case_record.Resolution_Comments__c}" />

<!--<apex:repeat value="{!case_record}" var="c">
                               <apex:inputField value="{!c.Resolution__c}"/>
                                <apex:inputField value="{!c.Response_Status__c}"/>
                                <apex:inputField value="{!c.Resolution_Comments__c}"/>


             <apex:pageBlockButtons location="bottom">

 <apex:commandButton value="Update" action="{!updates}"/>
  <apex:commandButton value="Cancel" action="{!cancel}"/>



share|improve this question
up vote 1 down vote accepted

enter image description here

The case can be edited from Guest Profile and Hence I fear it's not possible to update records of case using InputField atleast

workaround to use InputText as below using getter setter property

<apex:inputtext value="{!reason}" label="Reason" />
<apex:inputtext value="{!resolution}" label="Resolution"/>
<apex:inputtext value="{!resolution_comments}" label="Resolution Comments"/>

 public string reason{get;set;}
 public String resolution{get;set;}
 public String resolution_comments{get;set;}

And then do small mapping as below

public pageReference updates(){


    update case_record;
    pr = new PageReference(' id='+recordId);
    return pr;
share|improve this answer
Thank you verymuch. Its working fine. – Udaya Mar 6 '14 at 6:55

You need to check your field permissions. On the Site, there's a button to edit the profile that the Site uses; you need to make sure that the field is set as Visible and not set as Read Only. Also ensure that the object itself is also visible under the Object permissions.

share|improve this answer
thanks for replay i have checked public access setting that field is set as visible and object level. – Udaya Mar 6 '14 at 6:00

I got the exact same issue... Mohith suggested, the inputText will work, but I don't like this solution because I find it too long to implement.

I just discovered an other workaround while trying to get it done today...

public Case editCase {
    get {
        if (editCase == null) {
            String caseId = ApexPages.currentPage().getParameters().get('id');
            editCase = [Select Id, Subject From Case Where Id = :caseId];
            editCase.Id = null; // reset the case id to null will fix the problem, then before the update, set the id as described below
        return editCase;

public PageReference saveAction() {
    editCase.Id = ApexPages.currentPage().getParameters().get('id'); // before updating, re-add the id
    update editCase;

    return null;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.