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
diydiy 

after click a save button , record display in vf page

     I am trying to display the record name (Inchead.name) in vfpage after click the save button(display in same page).. but "{!Inchead.id}" is working fine.. but  {!Inchead.name} is not displayed in vf page

 

public Incident__c getInchead() {
      
      if(Inchead == null) Inchead = new Incident__c();
      return Inchead;
   }

 

public void save(){

Insert Inchead;

}

 

 

Vf

 

<apex:outputText value="{!Inchead.name}"/>

digamber.prasaddigamber.prasad

Hi,

 

Could you please share complete VF page, it will give complete visibility in your requirement.

 

Happy to help you!

diydiy

i posted sample code.. it is 1000 line code.. this is the major code.. it is under in pageblock section... like 10 componenent..after click save button , related record name in display in same page.. It is working in ID's

jiah.choudharyjiah.choudhary

@diya,

 

Is your requirement like, on clicking save, record gets saved and next time you load same page, it should display that name on page? Correct me if I am wrong.

diydiy

after save I am not  load the page ... bcos i am using output panel ... same page it will dispaly record name.. but record id showing.. pblm in name(inchead.name)...but  inchead.id working

jiah.choudharyjiah.choudhary
You may have to query the record based on the id and then use the name field.