Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. trigger Contact on Contact (before insert, before update)
  2. {
  3. for (Contact contact : trigger.new)
  4. {
  5. if (contact.Z__c == true && contact.X__c != null)
  6. {
  7. contact.Y__c = contact.X__c;
  8. contact.X__c = null;
  9. }
  10. if (contact.Z__c == false && contact.Y__c != null)
  11. {
  12. contact.X__c = contact.Y__c;
  13. contact.Y__c = null;
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement