You could get that sort of Metadata in SOQL via the Tooling API.
Select Id,DurableId,QualifiedApiName,EntityDefinitionId,NamespacePrefix,DeveloperName,DataType,Metadata,FullName from FieldDefinition WHERE EntityDefinition.QualifiedApiName = 'Account' AND QualifiedApiName = 'Industry'
Hey Daniel, Thanks for your precious time you spent to solve this issue. Actully now the issue is I tried to run that SOQL query on 'workbench.developerforce.com' and on execute an error occur.Below is the screen shot. Also i didn't find any filed with name - Metadata in FieldDefinition sObject on workbench. On other hand i try to get an id of values from a picklist through this query and got success in that: SELECT Id,isdefaultValue,durableId,validFor, label,value FROM PicklistValueInfo Where entityParticleId='Case.Priority'.
This query is executing and returning the IDs.But here another issue is that the id i got after execution of this query is getting changed on every update in values. what i mean is that, if i update a picklist value from HIGH to HIGHER then salesforece update all values with HIGH to its new i.e. HIGHER and at the same time id of HIGHER will also get updated. So how could i find if there is a permanent id.
We need this id as we are trying to import data from SFDC to an external application and maintain SFDC data in a relational database. So if any picklist value is getting changed we need to reflect the changed value in all relational tables in our system.
So my question is how can I get permanent ID value for each picklist values ?
You could get that sort of Metadata in SOQL via the Tooling API.
The Metadata field will contain the Custom Field Metadata, which includes the Picklist Metadata and values.
You can also get this data in Apex using the Describe calls, or via the Partner API using the metadata describe calls.
Thanks for your precious time you spent to solve this issue.
Actully now the issue is I tried to run that SOQL query on 'workbench.developerforce.com' and on execute an error occur.Below is the screen shot. Also i didn't find any filed with name - Metadata in FieldDefinition sObject on workbench.
On other hand i try to get an id of values from a picklist through this query and got success in that:
SELECT Id,isdefaultValue,durableId,validFor, label,value FROM PicklistValueInfo Where entityParticleId='Case.Priority'.
This query is executing and returning the IDs.But here another issue is that the id i got after execution of this query is getting changed on every update in values. what i mean is that, if i update a picklist value from HIGH to HIGHER then salesforece update all values with HIGH to its new i.e. HIGHER and at the same time id of HIGHER will also get updated. So how could i find if there is a permanent id.
We need this id as we are trying to import data from SFDC to an external application and maintain SFDC data in a relational database. So if any picklist value is getting changed we need to reflect the changed value in all relational tables in our system.
So my question is how can I get permanent ID value for each picklist values ?
Thanks
Saikat
https://success.salesforce.com/ideaView?id=08730000000bBlSAAU
As long as you only update the Value and keep the API Name. Would it work for you?