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
angelabregoangelabrego 

Get the master picklist value from a translated picklist value.

Let's say that one entry of a picklist is defined in the Translation Workbench as follows:

Master value: Hi
Spanish value:Hola
French value: Bonjour

How can I use the metadata API to get the master value from a translated value in a picklist ??
For example: If my only input is "Bonjour" how can I query the Translation Workbench to get "Hi"???

Any idea?
Thanks!
angelabregoangelabrego
Let me explain you in more detail my case:

  • I was asked to modify an S-Control.
  • This S-Control contains some html text input boxes.
  • When user click on an html button, some JavaScript code reads the value from the input boxes and concatenates a "where clause" string.
  • The "where clause" string is used to perform a query to a salesforce object.
  • This salesforce.com object contains some picklists fields These picklists fields, make use of the translation workbench, this means that when a user in Mexico creates/edits a record see the picklists values in Spanish, the user in the U.S. see the picklist values in English

Premise:
When a user in Mexico or the U.S creates a new record for this object the values that are inserted in to the database are not the Spanish values or English values, but the master values. So, when the a where clause is formed, and these picklists are involved, we must use master values.

The point is the following:
A user in Mexico, wants to use the Spanish values to create the where clause in the S-Control, but right now he needs to capture the master values in the input text boxes. User is confused: "What are those values? The values I know are in Spanish..." (showing me how he creates/edits a record of this object)

My idea is to find an API function that receives Spanish (or any other languages) values and get master values. Doing so, I can correctly form the where clause to do the query in the S-Control.

I´m asking for an API function to do that or something similar

Ispita_NavatarIspita_Navatar

When the translation workbench is enabled for your organization, the CategoryNodeLocalization object provides the translation of the label of a solution category. For information on the translation workbench, see the Salesforce.com online help.

Fields

1.CategoryNodeId- The ID of the solution CategoryNode that is being translated. (Field type Reference)

2.LanguageLocaleKey-This field is available in API version 16.0 and earlier. It is the same as the Language field.(Picklist)

3.Language -  This field is available in API version 17.0 and later. The combined language and locale ISO code, which controls the language for labels displayed in an application

4. Value- The actual translated label for the solution category. Label is translation.

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

 

jonathanrico.jonathanrico.

Hey Angel.

 

Have you tried toLabel()?

 

Here's a link with more info on it:

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_tolabel.htm