You need to sign in to do that
Don't have an account?
pranavshah
how to compare two account if i changed ownership for account
Suppose i am writing a a trigger handler class on opportunity..
if for one opportunity i need to change the account owner,, how it will be done using trigger..
how can i compare old and new value.
i am trying to write in the following way..
please suggest
public void updateAccountowner(list<opportunity> opportunities, map<id, opportunity> mapoldopportunity)
{
for(Opportunity opp:opportunities)
{
if(mapoldopportunity.get(opp.id).Amount!=='' && opp.amount!=='')
{
}
}
}
if for one opportunity i need to change the account owner,, how it will be done using trigger..
how can i compare old and new value.
i am trying to write in the following way..
please suggest
public void updateAccountowner(list<opportunity> opportunities, map<id, opportunity> mapoldopportunity)
{
for(Opportunity opp:opportunities)
{
if(mapoldopportunity.get(opp.id).Amount!=='' && opp.amount!=='')
{
}
}
}
Sunil Chandel 2
trigger.oldmap!= null && trigger.newmap!=trigger.oldmap