• shanshan
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 0
    Replies
I'm getting Expression Cannnot be assigned when I'm trying to populate the Account field 

for(Account acc : newAcc){
            Account oldAcc = oldMap.get(acc.Id);
            for(String fieldAPI : FieldSet){
                if(acc.get(fieldAPI) != oldAcc.get(fieldAPI)){    
                    //getting error from the below field
                    acc.get(fieldAPI) = oldAcc.get(fieldAPI);
                }
             }//loop
}//end loop

 

When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.  

 

That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it.