+ Start a Discussion
deepakMdeepakM 

Need common Picklist with same values in two different Custom Object.

HI everyone.

 

i have two custom objects named:

Airline,

Eticket.

In both the  custom object i used one picklist in each but having same values as like:

 

1. Object: Airline

Picklist name :Airline_name 

 

2. Object: Eticket

Picklist name:Airline_name 

 

 

I need that to be manage in one place, that if i change there it will depict in both the cases.

 

Please guide how can i get this common functionality work for both the custom objects.

 

 

Thanks

 

 

ForceMantis (Amit Jain)ForceMantis (Amit Jain)

I am not sure what is Kiran's approach to do this via Trigger. But using picklists it is not possible to achieve this. Are you doing this on native page layouts or do you have custom visual force pages?

deepakMdeepakM

i am using native page layouts not any vf page.

liron169liron169
I think that the only way to achieve this, will be to create new Custom object - Airline, and instead of pick list define the field as lookup to this object.

I think you should consider how often this picklist will be changed, how many values you have there, and in how many
places you going to use it.
if it small number of values, and they will used only in this 2 fields, than maintain those values in 2 places, it's no so bad.
deepakMdeepakM

hi

 

there is no limit yet, but at present we have 65 values and it will increases in future maybe upto 100 ,not above.

 

 

liron169liron169
Than why not define is as custom object?
and the fields as lookup fields
deepakMdeepakM

i just create one  test custom object with one picklist having some value.and refere this custome object as a lookupfield in my other custom object.but i am not get any value there that i define in test custome object.

 

please tell me where i go wrong.

 

 

thanks

 

 

liron169liron169

I did'nt ment you to create picklist field at all.

 

The value that you need in the picklist should be records in the new custom object that you define.

After that, when you use the lookup field in the Other objects (Eticket, Airline) you will be able to choose the needed Ariline from the existing records.

Prashanth GuptaPrashanth Gupta

Global Picklist

https://help.salesforce.com/articleView?id=fields_creating_global_picklists.htm&type=5