+ Start a Discussion
Prince VenkatPrince Venkat 

Picklist Value should be displayed in anotherfield

Hi
I have a picklist field called Type whenever i select a field from type it should automatically display on the another field called Name 
How to achieve this
Thanks in advance
 
VinayVinay (Salesforce Developers) 
You can simply use workflow and make field update or process builder to achieve above requirement.

Thanks,
Prince VenkatPrince Venkat
Hi Vinay 
Thanks For your reply PB and Workflows both perform operations on after insert only i want before insert also how to achieve
CharuDuttCharuDutt
Hii Prince Venkat
Try Below Trigger
trigger test on Objectname (before insert,before update) {
    if(trigger.IsBefore){
        if(trigger.IsInsert || trigger.IsUpdate){
            for(Objectname bc : trigger.new){
                bc.Name = bc.picklistfield;
            }
        }
    }
}
Please Mark It As Best Answer If It Helps
Thank You!

 
Suraj Tripathi 47Suraj Tripathi 47
Hi Prince,
Greetings!

You can implement this easily using the formula field.
Create a formula field called Name of return type Text.

IF(OR(Type = NULL,Type = ''),'',Type)

If you find your Solution then mark this as the best answer. 

Thank you!

Regards,
Suraj Tripathi