I basically want to add something like:
to my controller, which is below. Can anyone help??Thanks an advance!Controller:public PageReference save() {
opty.probability = 'INPUTTEXTFIELD';
update myAccount;
return null;
public class R2MPipeLineController{
public List<Opportunity> listOfLive {get; set;}
public List<Opportunity> listOfViability {get; set;}
public List<Opportunity> listOfLaunchPad {get; set;}
public List<Opportunity> listOfContractSent {get; set;}
public List<Opportunity> listOfQualified {get; set;}
public Opportunity Live {get; set;}
public Opportunity Viability {get; set;}
public Opportunity LaunchPad {get; set;}
public Opportunity ContractSent {get; set;}
public Opportunity Qualified {get; set;}
public R2MPipeLineController() {
listofLive = [Select id, name, CreatedDate, Company_Name__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Live' ORDER BY Weeks_Live__c DESC];
listOfViability = [Select id, name, CreatedDate, Company_Name__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Viability' ORDER BY Days_Since_Last_Modified__c DESC];
listOfLaunchPad = [Select id, name, CreatedDate, Company_Name__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Launch Pad' ORDER BY Days_Since_Last_Modified__c DESC];
listOfContractSent = [Select id, name, CreatedDate, Company_Name__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c, Contract_Age__c from Opportunity WHERE StageName = 'Contract Sent' ORDER BY Contract_Age__c ASC];
listOfQualified = [Select id, name, CreatedDate, Company_Name__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Qualified' ORDER BY Probability DESC];
}
}
Thank you, I added:
to my controller andpublic PageReference saveCS(){
UPDATE ContractSent;
return null;
}
to my VF page, however when I test the commandButton I get this error:<apex:commandButton id="update" action="{!saveCS}" value="Update Opptys"/>
I think I'm getting close here, but I can't seem to get this across the line.What am I missing?Attempt to de-reference a null object
Error is in expression '{!saveCS}' in component <apex:commandButton> in page r2m_contracts_out: Class.R2MPipeLineController.saveCS: line 15, column 1
An unexpected error has occurred. Your development organization has been notified.