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
Clint Jones 17Clint Jones 17 

Help adding visualforce field

Hi guys, i have one visual force page that i have no idea how to edit. I need to add an additional field called 'Customer Ref' the API name is 'Customer_Ref__c"

The screen shot below shows the location on the page layout where i need to add it 
User-added image
 Below is the visualforce page and the section where i need to add that extra field. I need to add it after the booking type field
User-added image

Any help would be appreciated as i have no idea about visualforce pages. Also is this the only this required to add this to the page?
Mukesh_SfdcDevMukesh_SfdcDev
Hi Clint,

Please ensure are admin or have you the pages access.
Setup->Quick Find Box -> Search Visualforce Pages->select yout page -> Edit. your page.

Please take the backup first then modified.

Or more help give your code and I will modify.

Thanks
Mukesh Kumar

 
Ajay K DubediAjay K Dubedi
Hi Clint,
As you have made the field Customer Ref so you just need to add that field now.
To do so just do the following.
<apex:outputlabel value="{!$Objecttype.case.fields.Customer_Ref__c.label}"/>
<apex:outputpanel styleclass="requiredInput" layout="block">
<apex:outputpanel styleclass="requiredblock" layout="block"/>
<apex:inputField value="{!case.Customer_Ref__c}" />
</apex:outputPanel>

Mark it as best if it helps.

Thanks
Ajay
mukesh guptamukesh gupta
Hi Clint Jones,

First find "Visualforce Page" from Left side search box, after that edit Visualforce page,

User-added image
NOTE:- if your Visualforce page is downloaded from manage packeged , then you can not edit this page.

Please MARK AS A BEST ANSWER!!!!

Regards
Mukesh 
Clint Jones 17Clint Jones 17
So i have added in the code and saved. I can edit the field after the case has been created but i cant fill in the field upon creating a case for the first time. Am i missing something?