You need to sign in to do that
Don't have an account?
Balasubramani Dhanapal
opportunities close date as today()?
Hi all,
I am beginer of salesforce.Please any one help me the following code implementation. how to Write Apex class to update all the opportunities close date as today()?
Thanks in advance
I am beginer of salesforce.Please any one help me the following code implementation. how to Write Apex class to update all the opportunities close date as today()?
Thanks in advance
for(Opportunity opp: opplist){
opp.closedate=date.today();
}
database.update(opplist,false)
All Answers
If you want to update your existing opportunities you can use data loader to update all your existing opportunities.
Any reason you need apex code implementation?
if you need to update all existing opportunities one time without data loader then you can write a code in Developer console to update opportunities.
Thanks
Prakash
Date Tdate = System.today();
next do this,
opp.CloseDate= Tdate;
it wud work for you.
for(Opportunity opp: opplist){
opp.closedate=date.today();
}
database.update(opplist,false)
List<Opportunity> opplist=[select closedate from Opportunity];
for(Opportunity opp: opplist){
opp.closedate=date.today();
}
database.update(opplist,false)