I have industry field having some values and now i want to update those values with new adding some more functionality. Please provide how to write a trigger on this
Actually i have a picklist of values in Industry.
In that industry for 2-3 values i have to update with another value in
place of those values by following some more functionality like in user
object some picklist and in the lead some field value comparision.
After comparing i have to update those values.
Is it possible? if it is not why? any specific reason.
I'm still not clear I'm afraid - are you trying to update the value of the industry field on a record, or are you trying to add some additional options to the pickist like you would through the setup menu?
ok i will explain in detail:
there is a custom picklist like *region* in user object in that the values
are like usa - CA, usa - LN, United kingdom- SG, United kingdom- UI like
this.
and in the lead object there willl be *another picklis*t having values
USA, United kingdom.
Now the functionality i have to perform is if *region *Contains USA
and *another
picklis*t is USA. We have to update Industry field (picklist) in lead with
a new value in place of an existed values
Okay, so it sounds like you want to update the configuration of the lead sobject, rather than a particular instance. There is no supported way to do this from Apex. You may be able to consume the metadata WSDL using the Financial Force apex wrapper:
I don't have any more detail I'm afraid. You can't do it directly from Apex. Financial Force have some code that may allow you to do this, but I've not used it.
https://github.com/financialforcedev/apex-mdapi