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
Suraj_BahaleSuraj_Bahale 

Opportunity opp = [select id, StageName from opportunity limit 1]; Given the code above, how can a developer get the label for the StageName field?

A. Call “Opportunity.StageName.Label”.
B. Call “Opportunity. StageName.getDescribe().getLabel()”.
C. Call “opp.StageName.getDescribe().getLabel()”.
D. Call “opp.StageName.Label”.
Best Answer chosen by Suraj_Bahale
MagulanDuraipandianMagulanDuraipandian
Answer is B.
Check https://www.infallibletechie.com/2019/11/how-to-get-label-name-for-objects-field.html for more information.

All Answers

Danish HodaDanish Hoda
C
MagulanDuraipandianMagulanDuraipandian
Answer is B.
Check https://www.infallibletechie.com/2019/11/how-to-get-label-name-for-objects-field.html for more information.
This was selected as the best answer