5

I saw a duplicate today asking:

Why doesn't the following work?

SObject record; // assigned elsewhere
if (record.Some_Checkbox__c) { ... }

It took me a little while to find a good Q&A, even though I knew I had seen similar before, and even posted the accepted answer.

Working with SObjects instead of concrete custom objects (i.e., abstraction in apex)

Should we mark this post as canonical? Should the question and/or answer be a wiki? Our community consensus/guidance in this area seems unclear.

1
  • 2
    I'm in support of tagging as a canonical QA. Questions about get()/put() as well as static field access with SObject are pretty common.
    – David Reed
    Commented Dec 9, 2021 at 16:21

1 Answer 1

3

Done. Going with yes, this Q&A is canonical.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .