All Ideas

Idea Details

Post an Idea
40  Points
Open
Idea has been posted. Give it an upvote or downvote.

Visualforce Remote Objects should support translations

Visualforce & Aura

Is it possible to retreive translated picklist values using VF Remote Objects?

For example, I have a Solution and I'm trying to get Solution.Status.

So I have the following:

  <apex:remoteObjects >
    <apex:remoteObjectModel name="Solution" fields="SolutionName,Id,Status" jsShorthand="Service"/>
  </apex:remoteObjects>

And then in JS, I do something like this:

new SObjectModel.Service().retrieve(
    {
      where: { .... criteria... },
      orderby: [{ CreatedDate: 'ASC' }],
      limit: 20
    },
    function (err, results, evt) {
      if (err) {
        onError(err);
      } else {
        results.forEach(function (sol) {
          console.log(sol.SolutionName, sol.Status);
        });
      }
    }
);

Right now, my console shows only untranslated values.

I'd like to be able to change my remoteObject declaration to something like:

  <apex:remoteObjects >
    <apex:remoteObjectModel name="Solution" fields="SolutionName,Id,TOLABEL(Status)" jsShorthand="Service"/>
  </apex:remoteObjects>
And access the label as (maybe) sol.Status.Label (and access the value as sol.Status.Value)?  That's a little clunky, but workable.  Better might be sol.Status__label vs. sol.Status.

But I currently get the following compilation error:
Invalid field 'Solution.TOLABEL(Status)' specified. Ensure that you use the full API name for any custom fields.


For reference, here's this same question in SF.StackExchange.

Merge Idea · Flag

  • Upvotes
  • Downvotes

Ideas

Apps

from AppExchange

Questions

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



 

 

Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


 

Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.