-
-
Save reuf/ed90c72c4a9c858da0c4 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