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
JoshTonksJoshTonks 

Controller Extension Class help Save function

Hi All,

I am trying insert a parameter into the record save in an apex controller extension.

Any help would be appreciated on this.

This is the controller extension pretty basic at the moment
 
public with sharing class CSATExtension
{    
   ApexPages.StandardController stdCtrl;
   // extension constructor
   public CSATExtension(ApexPages.StandardController std)
   {
      stdCtrl=std;
   }

   public PageReference save()
   {
      stdCtrl.save();
      PageReference pr = new PageReference('http://www.ramtracking.com/thankyou');
      pr.setRedirect(true);
      return pr;
   }
}

I have a parameter in the url that comes to this page of PSC.

Do i need to set it like this
 
public integer PSC {get;Set;}

Or would it be with
 
public string PSC = apexpages.currentpage().getparameters().get('PSC');

I cant find a way make an apex form update when saving the existing record stdCtrl.save();

Please if anyone can point me in the right direction