Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
i want to fetch the record name using record id.
below is my dynamic query
SObject record = Database.query('Select CaseNumber From ' + sObjName + ' Where Id = :subOrderId');
Could anyone please let me know how can i extract the CaseNumber alone from the above query.
asked Feb 23, 2018 at 10:11
21322 gold badges66 silver badges2121 bronze badges
For accessing fields from SObject use getter methods like:
// with String
// with Schema.sObjectField
answered Feb 23, 2018 at 12:43
18.3k44 gold badges3333 silver badges6363 bronze badges
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged