function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DrceteDrcete 

Is it possible to get a table's "display values" from somewhere?

Hello,

I'm new in salesforce development. 
I come from servicenow where it is possible to specify a table's display value. (This is just a field that identifies each record and allows users to easily recognize each entry).
Is it possible to configure something similar in salesforce?
I will use this information in an external app that will allow users to select records from any table in a dropdown.
The system would figure out what fields are key (display values) for any specific table and then do a query of that information to display it as the text of each dropdown entry (the value would be the ID).

Thanks!
 

 

Best Answer chosen by Drcete
DrceteDrcete
The table's SearchLayout settings for lookups worked for me.
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_searchlayouts.htm

All Answers

VinayVinay (Salesforce Developers) 
Hi Drcete,

There is no direct way to do this,  You would need to build custom integration using SOAP or REST API so pull values in any external app from salesforce and vice versa.

Thanks, 
DrceteDrcete

Hello Vinay;
Thanks, I'm already doing this. 
My question is: is there a setting in salesforce where you can configure what fields should be used in a table as display values?
For example in a Customer table, these fields could be the customer's first and last name. I would pull this configuration from my Rest class and afterward use those fields as text values in my external app's drop down list.

VinayVinay (Salesforce Developers) 
Unfortunately, answer is no you need to parse values when you make API call.

Below is sample reference of JSON.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_json_jsonparser.htm

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
DrceteDrcete

Thanks again Vinay,
I'm sorry, I wasn't clear previously.
I know about the REST APIs, I'm already using them in my implementation.
My question is: is there a way to tell salesforce what fields are most important in a table and can be used to identify the record easily?
As I was saying, there is a setting in servicenow that allows you to mark a table column as the display value of the table. Servicenow will use this column afterward in some record pickers to facilitate identifying each record in the table. (example: the company name in a company table can be used as the display value).

 
DrceteDrcete
The table's SearchLayout settings for lookups worked for me.
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_searchlayouts.htm
This was selected as the best answer