You need to sign in to do that
Don't have an account?

trigger on opportunities records to change the closed dates of every opportunities records under account object
hi all,
My Task is to change the due date or closed date of opportunity records under account object
1st opportunity record to 75 days == created date + 75 days
2nd and 3rd or more to 180 days == created date +180 days
thanks in advance...
My Task is to change the due date or closed date of opportunity records under account object
1st opportunity record to 75 days == created date + 75 days
2nd and 3rd or more to 180 days == created date +180 days
thanks in advance...
Try the below code. It's working me. Trigger: please try and let me know. if it helps you, please mark it as solved and the best answer
All Answers
Try the below code. It's working me. Trigger: please try and let me know. if it helps you, please mark it as solved and the best answer
Thank you very much.
If you any doubts please let me know
thank you for your code but i am getting :(wrong)
1st and 3rd or more opportunity record to 180 days
2nd opportunity record to 75 days
But i must get :
1st opportunity record to 75 days
2nd and 3rd or more to 180 days
I have modifed. Before i used close date. Sorry for that. Now i have changed to System.today(). Try the below one and let me know.
I need one more information. When we need to trigger that below code. I meant on Insert or update or both.
once again i am facing same error i am getting :(wrong)
1st and 3rd or more opportunity record to 180 days
2nd opportunity record to 75 days
But i must get :
1st opportunity record to 75 days
2nd and 3rd or more to 180 days
What output are you getting?
I need one more information. When we need to trigger that below code. I meant on Insert or update or both.
i am getting output 1st opportunity and 3 rd opportunity and more opportunitys = created date + 180 days
2nd opportunity =create date + 75 days
But i must get :
1st opportunity record to 75 days
2nd and 3rd or more to 180 days
change 1st opp to = create date + 75 days
2nd and 3rd or more = create date +180 days
try the below one let me know
the code is working now
thank you for your valubale time i posted a new question in my org or profile so please go through it and try to solve..........................