function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AlexskiAlexski 

populate "owner" field based on another field value

I would like to populate the owner field for a custom object based on the value of another field in that same record.  In pseudocode, that might look like this

 

switch (owner) {

     case 'ED':

          owner = "Ellen M"

          break

     case "HLTH":

           owner = "Toni"

 

Can this be done.  These records are being uploaded daily from our student information system, but I'd rather not mess with the import file if I don't need to.

Srikant JoshiSrikant Joshi

Hi,

 

Yes, you can.

 

Create a trigger that assigns the ID of owner field everytime using the value.

 

If you ok with trigger concept I can provide you the code.

 

Regards,

joshisrik@gmail.com

AlexskiAlexski

Is there a way to create a trigger for a custom object?