You need to sign in to do that
Don't have an account?
Théo ZANCHI
get a field name in soql
Hello all,
I am looking for a SOQL request that could get me both the value and etiquette of a field on a custom object ; is this somehow possible in SOQL?
Thanks in advance
I am looking for a SOQL request that could get me both the value and etiquette of a field on a custom object ; is this somehow possible in SOQL?
Thanks in advance
Yes, we can use Metadata Describe call which can provide us the Custom Object field API name and its value without any query but this works only in VF page Standard Controller.
Hope this will helps you.
Thanks,
Gaurav
Skype: gaurav62990
Do follow this line of code below:
Schema.getGlobalDescribe().get('ObjectName').getDescribe().fields.getMap().get('FieldName').getDescribe().getLabel();
For more information do follow the link as below:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_sobject_describe.htm#apex_methods_system_sobject_describe
Hope you will find this information helpful.
Thanks.
Ajay Dubedi