Last active
December 20, 2015 23:09
-
-
Save martyychang/5c8f3810c3edadfbd9ad to your computer and use it in GitHub Desktop.
Trigger to enable users to change the Case Owner through a proxy field via a publisher action in Salesforce1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger SetNewOwner on Case (before insert, before update) { | |
for (Case eachCase : Trigger.new) { | |
if (eachCase.NewOwner__c != null) { | |
eachCase.OwnerId = eachCase.NewOwner__c; | |
eachCase.NewOwner__c = null; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are awesome!