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 answers only not deleted user 18731

An sObject represents an object, such as an Account or Campaign. An sObject is the base object for all objects in Apex.

3 votes
Accepted

Get fields from custom object

Yes when you use Sobject.FieldAPIName then only you receive error Field expression not allowed for SObject Because you cant access the value this way. … Solution You need to use SObject get() method to get the value... Sobject Methods like Sobject.get('FieldAPIName') This will give you the value of that Field i.e. FieldAPIName.. …
Ratan Paul's user avatar
  • 22.8k
28 votes
Accepted

Get all Parent and child objects related to the current object

Get All Parent objects. for(Schema.SobjectField strFld: Account.SobjectType.getDescribe().fields.getMap().Values()) { if(strFld.getDescribe().getType() == Schema.DisplayType.REFERENCE) { …
Ratan Paul's user avatar
  • 22.8k
0 votes
Accepted

Metadata for matching filter for sObject

Using SOQL I don't think this is possible but using listview describe you will get the all details check this out List View Describe Returns detailed information about a list view, including the …
Ratan Paul's user avatar
  • 22.8k
1 vote
Accepted

Get a deleted record using SObject Rows returns "The requested resource does not exist"

QueryAll QueryAll will return records that have been deleted because of a merge or delete. QueryAll will also return information about archived Task and Event records. QueryAll is available in API ve …
Ratan Paul's user avatar
  • 22.8k
0 votes
Accepted

Error: "SObject row was retrieved via SOQL without querying the requested field"

here LastModifiedById field is not available on objTask record. So you can do this. controller.addFields(new List<String>{'LastModifiedById'}); objTask = (Task)controller.getRecord(); this will f …
Ratan Paul's user avatar
  • 22.8k