AnswerBun.com

How to access custom fields master table in developer console

Salesforce Asked by Nandy on October 3, 2020

We have integrated salesforce with our internal portal. On opportunity we have a field names Tags and there are certain values in it. When i use select Tags__c from Opportunity, i am getting only api names. How do i get the list of all labels in the Tags field? Is there a way to access the master table of the custom fields.

How to get the api name and label name in a single query?

Thank you in advance for the help

One Answer

If you need to be able to read and write the proper values, you need a describe object call (describeSObject). This is available in SOAP, REST, and the UI-API. For example, you could call /services/v48.0/sobjects/Opportunity/describe to get the describe information.

In any case, you'll get the field and all possible API values, and their respective labels to present to a user. If you just need a translated value directly from a query (read-only access), you can use SOQL's toLabel method:

SELECT toLabel(Tags__c) FROM Opportunity

Correct answer by sfdcfox on October 3, 2020

Add your own answers!

Related Questions

Salesforce Report : Multiple leads from same Org

0  Asked on November 11, 2021 by salesforce-development

     

Not seeing Quick Text

1  Asked on November 11, 2021 by michele-kleinhomer

 

Salesforce Custom Notifications Url – REST API

0  Asked on November 8, 2021 by gaurav-thakur

   

Convert date field to ISO 8601 format in REST API Post Callout

1  Asked on November 8, 2021 by luke-higgins

         

Link Managed Package to Professional Edition

1  Asked on November 8, 2021 by liron-c

 

Insert multiple records using salesforce batch apex – DML Error

1  Asked on November 5, 2021 by salesforce-tech-enthusiast

   

SFDX: Authorize an Org failed

6  Asked on November 5, 2021 by frantisek

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP