Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trigger Contact on Contact (before insert, before update)
- {
- for (Contact contact : trigger.new)
- {
- if (contact.Z__c == true && contact.X__c != null)
- {
- contact.Y__c = contact.X__c;
- contact.X__c = null;
- }
- if (contact.Z__c == false && contact.Y__c != null)
- {
- contact.X__c = contact.Y__c;
- contact.Y__c = null;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement