Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 256

Salesforce allows you to describe sObjects either by using sObject or field tokens, or the describeSObjects Schema method.

11 votes
2 answers
1k views

Apex method to find out if SObject is a setup object

Regular SObjects and Setup Objects can't be mixed in DML otherwise you'll experience a Mixed Dml Exception. How can Apex code find out if a given SObjectType is such a setup object? System.assert(is …
11 votes
1 answer
619 views

Drawbacks of using SObjectField.toString() over SObjectField.getDescribe().getName()

I often do '' + field where field is an SObjectField to get the field's API name. I like that much more than the clunky verbose field.getDescribe().getName(). So is there a reason I should not do it …
2 votes
1 answer
527 views

Find out if field is of type Currency without consuming Describe's?

Parts of my code copy hundreds of arbitrary fields of an arbitrary object to another object. Before copying currency fields I want to do some fx conversion. How can I find out if a field is a currenc …
6 votes
2 answers
2k views

Test if a field is available on arbitrary SObject record without using Describe calls

I have many Custom Objects in my package that have a common custom field Version__c. One part of my app serializes and deserializes records to/from Json. While deserializing I want to change this Vers …