Process and Automation Flashcards
What is heap size?
Heap size in actual is the count of memory used by the variables, object instances in an Apex class. In order to store these objects & variables, memory is allocated in Salesforce which is derived from allocated Heap
What DML operation will allow other records in a list to be inserted even if there are records that failed?
Database.Insert(sObjectsToCreate,false);
-dml statements have that allornone parameter that can be set to false to allow for partial success
Which tasks are best achieved using process builder instead of workflow rules?
- copying the account postal code to all child contacts
- field update on parent object
- submitting an order for approval
- creating tasks at multiple intervals
Both can create task records at multiple intervals and both can update fields on parent records. (master-detail is required for workflow rules)
Only a process can submit a record for approval and update CHILD records.
Which of the following are valid Apex expressions?
- @future
- 7=true
- new List()
- 3+4
- myClass.myMethod()
-new List()
- 3+4
-myClass.myMethod()
these are all valid apex methods
Apex expressions can be…
- a literal expression
- a new sObject
- Apex object
- list
- set
- map
- static/instance method invocation
What is @future in Apex?
An annotation to identify methods that are executed asynchronously
What primitive data types are used with numbers in Apex?
- Decimal
- Integer
- Long
- Double
How are variables declared in Apex?
Integer i = 0; String str; List strList; Set s; Map m; Multiple variables are declared using comma separation: Integer i, j, k;
What value do Apex variables have if a value is not assigned?
All apex values are initialized to null if they are not explicitly initialized.
Are SOSL and SOQL statements case-sensitive?
No, SOSL and SOQL are case- insensitive
What is true when defining Apex classes?
- It is required to specify an access modifier inn declaring top-level class
- it is optional to specify an access modifier in declaring inner class
- the keyword [class] followed by the name of the class is necessary
- a developer may add optional extensions and/or implementations
What are reasons for using a static method or variable?
- To store information that is shared across instances of a class
- To create a utility method in a class
- To use a method or variable without instantiating its class
What standard objects do NOT support DML statements?
ApexComponent ApexPage BusinessHours BusinessProcess CategoryNode CurrencyType DatedConversionRate ProcessInstance Profile RecordType SelfServiceUser StaticResource Territory2 UserAccountTeamMember UserPreference UserTerritory WebLink
What is a valid way of referencing or instantiating a PageReference?
- Page.existingPageName;
- PageReference pageRef = new PageReference(‘URL’);
What is an ENUM data type?
An Enum is an abstract data type with values that each take on exactly one of a finite set of identifiers that you specify. Use Enum to specify a set of constants.
(EX: Enum Day{SUNDAY, MONDAY, …SATURDAY}
Email-to-Case can only be used on what kind of object?
a standard object. it will create a new case from an email sent to a specific address
-Email to custom Object is not an existing feature
What can a Custom Email Handler do?
A custom email handler can be defined to handle inbound emails and perform operations such as creating or updating records based on email content.
Which optional clause can be added to a SOSL query to specify the information returned in the text search result?
RETURNING
What are some valid escape sequences that can be used in queries to allow the query to contain special characters?
- ' (one single-quote character)
- " (one double-quote character)
- \n (new line)
- \ (Backslash)
Records with locations saved in geolocation or address fields as individual latitude and longitude values can be retrieved by appending what to the field name?
they would be appended with __s instead of the usual __c.
EX: ‘latitude__s’ or ‘longitude__s’
What can be assumed from this expression?
private static final integer number numberOfStudents = 25
a variable named numberOfStudents that has a constant (STATIC, FINAL) value of 25 (INTEGER) and is accessible only within (PRIVATE) the apex class which it is defined.