Skip to main content
Paddy R ha fatto una domanda in #Customer Service
Object A

 

field A

 

________

 

A

 

A

 

B

 

I need to compare field value before update record..

 

for e.g: If current and last field value is same then do something else other stuff

 

if(old == new)

 

else

 

{

 

}

 

can we use this using apex code without writting trigger..

 

List<myObject__C> obj = [Select A from myObject]

 

for (myObject abc: obj)

 

//here I need to compare the value of previous and current record...

 

like if(old == new value)

 

can you please help me on this?
2 risposte
  1. 28 mag 2014, 07:44
    Hi Paddy,

     

    You can use a workflow and use the "ischanged" function in the criteria.

     

    If your field name is "x__c" then the criteria would look like this: ischanged(x__c).

     

    And then define a field update to do whatever you want to do.