25 lines
833 B
OpenEdge ABL
25 lines
833 B
OpenEdge ABL
public class test1234{
|
|
public static void main1(){
|
|
/* List<Opportunity> ol = new List<Opportunity>();
|
|
for(Integer i=1;i<=5;i++){
|
|
Opportunity opl = new Opportunity();
|
|
opl.Name='test'+i;
|
|
opl.StageName = 'Prospecting';
|
|
opl.CloseDate=Date.today();
|
|
ol.add(opl);
|
|
}
|
|
insert ol;*/
|
|
// First, query for the opportunities you want to update
|
|
List<Opportunity> oppsToUpdate = [SELECT Id, Name,StageName FROM Opportunity WHERE Name = 'Today1' OR Name='Today2'];
|
|
system.debug('@@@@ reocrds'+ oppsToUpdate);
|
|
// Then, make the changes to the records
|
|
for(Opportunity opp : oppsToUpdate) {
|
|
opp.StageName = 'Closed Won';
|
|
}
|
|
|
|
// Finally, update the records in the database
|
|
update oppsToUpdate;
|
|
}
|
|
|
|
|
|
} |