DEVELOPER I ACTUAL EXAM |
Question and answers | Latest
2024/2025
What do Object permissions control? - ANSWER -What objects can users access (create, read,
write, delete, view all, mod all)
What do Field permissions control? - ANSWER -What fields can users see on objects they have
access to
What do Org Wide Defaults control? - ANSWER -Record level access - which records for an
object can internal/external users see/change by default (private, public read, public read/write)
and whether access can be granted using hierarchies
What do role hierarchies, sharing rules and manual sharings control? - ANSWER -Record level
access - what exceptions from OWD defaults should be made
How can you describe sObjects? - ANSWER -You can describe sObjects either by using tokens
or the describeSObjects Schema method
Describe how to programmatically access and utilize the object schema. - ANSWER -Short:
Schema.sObjectType.Contact.fields.Email.isUpdateable()
Schema.sObjectType.Contact.isDeletable()
Long:
Apex provides two different ways of obtaining object and field descriptions.
* A Token is a serializable reference to the object or field type.
,* A DescribeSObjectResult is a reference to an object or field description that is evaluated at run-
time.
Using Tokens:
- Schema.SObjectType is the data type for an sObject token.
- Schema.sObjectType t = Account.sObjectType;
- Account a = new Account();
Schema.sObjectType t = a.getSObjectType();
Obtaining sObject Describe Results Using Tokens:
- Call the getDescribe method on an sObject token
Schema.DescribeSObjectResult dsr = Account.sObjectType.getDescribe();
- Use the Schema sObjectType static member variable
Schema.DescribeSObjectResult dsr = Schema.SObjectType.Account;
Using Field Describe Results
- Call the getDescribe method on a field token.
Schema.DescribeFieldResult dfr = Account.Description.getDescribe();
- Access the fields member variable of an sObject
token with a field member variable (such as Name, BillingCity, and so on.)
Schema.DescribeFieldResult dfr = Schema.SObjectType.Account.fields.Name;
,What are the Field Describe considerations? - ANSWER -- A field describe that's executed from
within an installed managed package returns Chatter fields even if Chatter is not enabled in the
installing organization. This is not true if the field describe is executed from a class that's not
within an installed managed package.
- When you describe sObjects and their fields from within an Apex class, custom fields of new
field types are returned regardless of the API version that the class is saved in. If a field type,
such as the geolocation field type, is available only in a recent API version, components of a
geolocation field are returned even if the class is saved in an earlier API version.
Describe the capabilities and use cases for formula fields. - ANSWER -- Cross-object formula
always works FROM CHILD TO PARENT means you can create formula on child to reference
parent only.
- Cross-object formulas can reference merge fields from a master ("parent") object if an object is
on the detail side of a master-detail relationship.
- Cross-object formulas also work with lookup relationships.
If parent has to refer to its child then it has to be a roll-up summary field (in a master-detail
relation), or trigger for complex logic.
What are the types of formula fields? - ANSWER -Checkbox
Currency
Date
Date/TIme
Number
Percent
, Text
What is one the main security consideration for using a formula field? - ANSWER -Formula
fields that a user can see may REFERENCE FIELDS THAT ARE OTHERWISE HIDDEN or
READ ONLY for that user. Therefore, if a formula field contains sensitive information,
configure field-level security directly on the formula field.
What is the main limitation of formula fields? - ANSWER -Formula Fields can reference field
values from related Parent objects that are up to 10 relationships away.
Describe the capabilities and use cases for roll-up summary fields - ANSWER -A roll-up
summary field calculates values from related records, such as those in a related list. You can
create a roll-up summary field to display a value in a master record based on the values of fields
in a detail record. The detail record must be related to the master through a master-detail
relationship.
What types of calculations are supported by a roll-up summary field? - ANSWER -- Count the
number of detail records
- Sum of detail records
- Min value across all detail records
- Max value across all detail records
What is one the main security consideration for using a roll-up field? - ANSWER -Similar to
formula fields, data that would otherwise be unavailable to users due to field-level security, can
potentially be exposed to a user via roll-up summary field. Therefore, always configure field-
level security for the roll-up field, if the detail record has field-level security.
What are some of the limitation of the roll-up summary fields? - ANSWER -When you delete a
child record on a roll-up Summary field, Salesforce doesn't recalculate the value of the field.