Search Results
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 |
An sObject represents an object, such as an Account or Campaign. An sObject is the base object for all objects in Apex.
1
vote
Want to restrict a user from creating more than 10 records w/o RSF
Here's an alternative - requiring no code to write
Install the Declarative Lookup Rollup Summary open source package from GitHub, written by esteemed SFSE contributor Andrew Fawcett
This can count …
1
vote
Dynamic Apex SObject Iteration
Moving comments to answer
someSobj.getSobjectType() returns the sobjectType of the sobject (e.g. … These should be enough to get you from an arbitrary list of sobjects to an ID plus sobject name. …
0
votes
Displaying Related List on Custom Object: SObject row was retrieved via SOQL without queryin...
If I understand your schema correctly, you have
Quote_Bundle__c with lookup to Product_Bundle__c
Product_Bundle__c is parent of Product_Bundle_Products_Association__c
Product_Bundle_Products_Associat …
2
votes
Accepted
APEX equivalent for SObject Tree -> insert nested objects
I would adopt the Unit Of Work pattern provided in Lightning Enterprise Architecture aka fflib aka apex-common
Maintains a list of objects affected by a business transaction and coordinates the writi …
30
votes
Accepted
How to convert a string to sObjectType
An alternate way to do this without going through Schema.getGlobalDescribe():
String myString = 'Account';
SObjectType sObjType = ((SObject) Type.forName(myString).newInstance()) …
1
vote
Accepted
System.QueryException: No such column 'CurrencyIsoCode' on entity 'OpportunityContactRole' w...
The reason for this error is your version of class fflib_SObjectDescribe is too old to recognize the recent addition of CurrencyIsoCode in OpportunityContactRole
This field was added in V47.0 - see Ob …
1
vote
Accepted
Rendering Array of Custom Objects in Component
If a Community User page, then the running user needs access to the field as well as read access to the relevant Sobject(s) Linked_Service_Standard_Location__c in your case. …
8
votes
Accepted
Do email results come in the same order as the list of emails
To answer the specific question, the sendEmail method returns a list of Messaging.SendEmailResult objects. This list will be in the same order as the corresponding list of emails provided to sendEmail …
2
votes
Accepted
Problem populating a list of children related to a queried sObject
I don't believe this construction is valid as child relationships can't be dynamically added to sobjects unless the original query included the child sObject
For example:
Account[] aList = [select id …
5
votes
Accepted
What do I have to do in this case: List<Sobject> or Sobject?
In my experience, selector methods should, in general:
accept collections as input and return collections as output. This avoids null checks.
not be static as it facilitates mocking patterns such as …
1
vote
Accepted
Give access to User.ProfileId without "View Profile and Configuration" permission
Salesforce defaults the execution context based on the type of flow
User
System w/ sharing
System w/o sharing
User context enforces CRUD, FLS and sharing (i.e. record visibility). System context ign …
14
votes
What is the object that stores "files"
The actual "content" of the file is saved as a ContentVersion
ContentVersion can have custom fields
ContentVersion is a child of ContentDocument - an object implicitly created by SFDC when the first …
0
votes
Building out a multi-dimensional array / list for an update statement
// Build xref map - assumes a given pastContactId refers to 1 and only 1 Contact
Map<Id,Contact> contactsByPastContactId = new Map<Id,Contact>();
for (Contact c : contacts) {
for (String pastContac …
2
votes
Apex Testing Error: System.QueryException: List has no rows for assignment to SObject
I think your problem is here:
EmailTemplate template = (EmailTemplate)[SELECT Id, Subject, Body, HTMLValue
FROM EmailTemplate
WHERE …