Here is my controller:
I am trying to get this statement:public with sharing class QualOpController
{
public List <Opportunity> Opty {get;set;}
public list<String> campaigns {get;set;}
public PageReference saveOp(){
UPDATE Opty;
return null;
}
public String getName(){
return 'QualOpController';
}
public void load()
{
campaigns= new List<String>();
Opty = [Select id, name, CreatedDate, StageName, Vert_Med__c, Company_Name__c, Next_Step__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 Pipeline_Oppty__c = TRUE ];
Set<String> campaignSet = new Set<String>();
for (Opportunity j : Opty)
campaignSet.add(j.Vert_Med__c);
for (String campaign : campaignSet)
{
campaigns.add(campaign);
}
campaigns.sort();
}
}
to update these records:public PageReference saveOp(){
UPDATE Opty;
return null;
}
public String getName(){
return 'QualOpController';
}
But the changes just won't save. Is there anything I can do differently to make this work? Thanks, Johncampaigns= new List<String>();
Opty = [Select id, name, CreatedDate, StageName, Vert_Med__c, Company_Name__c, Next_Step__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 Pipeline_Oppty__c = TRUE ];

John: There is nothing that you are doing to the Opty records, all I see is a query and a subsequent Update Opty but no field is being updated.I think in your public PageReference saveOp(){ you want something like upsert campaigns which I see being manipulated in your Load method after the query.