Salesforce
PDII · Question #363
PDII Question #363: Real Exam Question with Answer & Explanation
The correct answer is A. Use toLabel(Products__c) in the fields list of the SOQL query.. See the full explanation below for the reasoning.
Question
Universal Containers (UC) has enabled the translation workbench and has translated picklist values. UC has a custom multi-select picklist field, Products__c, on the Account object that allows sales reps to specify which of UC's products an Account already has. A developer is tasked with writing an Apex method that retrieves Account records, including the Products__c field. What should the developer do to ensure the value of Products__c is in the current user's language?
Options
- AUse toLabel(Products__c) in the fields list of the SOQL query.
- BUse the locale clause in the SOQL query.
- CCall the translate() method on each record in the SOQL result list.
- DSet the locale on each record in the SOQL result list.
Community Discussion
No community discussion yet for this question.