A developer has a block of code that omits any statements that indicate whether the code block should execute with or without sharing.
a. HTTP Callouts
b. Apex Controllers
c. Anonymous Blocks
d. Apex Triggers correct answers a. HTTP Callouts
A company wants a recruiting app that models cand...
A developer has a block of code that omits any statements that indicate whether the
code block should execute with or without sharing.
a. HTTP Callouts
b. Apex Controllers
c. Anonymous Blocks
d. Apex Triggers correct answers a. HTTP Callouts
A company wants a recruiting app that models candidates and interviews; displays the
total number of interviews on each candidate record; and defines security on interview
records that is independent from the security on candidate records. (2)
a. Create a lookup relationship between the Candidate and Interview objects.
b. Create a master-detail relationship between the Candidate and Interview objects
c. Create a trigger on the Interview object that updates a field on the Candidate object.
d. Create a roll-up summary field on the Candidate object that counts Interview records
correct answers a. Create a lookup relationship between the Candidate and Interview
objects.
c. Create a trigger on the Interview object that updates a field on the Candidate object.
What is the value of x after the code segment executes?
String x = 'A'
Integer I = 10;
if (I < 15){
I = 15;
x = 'B';
} else if ( I < 20) {
x = 'C';
} else {
x = 'D';
}
a. D
b. A
c. B
d. C correct answers c. B
Where would a developer build a managed package?
a. Developer Sandbox
b. Unlimited Edition
c. Partial Copy Sandbox
d. Developer Edition correct answers d. Developer Edition
What is a valid way of loading external Javascript files into a Visualforce page? (2)
,a. Using an <apex:includeScript> tag.
b. Using an <apex:define> tag.
c. Using a <link> tag.
d. Using a <script> tag. correct answers a. Using an <apex:includeScript> tag.
d. Using a <script> tag.
In a single record, a user selects multiple values from a multi-select pick list.
How are the selected values represented in Apex?
a. As a String with each value separated by a comma.
b. As a Set<String> with each value as an element in the set.
c. As a List<String> with each value as an element in the list.
d. As a String with each value separated by a semicolon. correct answers d. As a
String with each value separated by a semicolon.
Which trigger event allows a developer to update fields in the Trigger.new list without
using an addition DML statement? (2)
a. After update
b. Before insert
c. Before update
d. After insert correct answers b. Before insert
c. Before update
What is an important consideration when developing in a multi-tenant environment?
a. Governor limits prevent tenants from impacting performance in multiple orgs on the
same instance.
b. Unique domains names take the place of namespaces for code developed for
multiple orgs on multiple instances.
c. Polyglot persistence provides support for a global, multilingual user base in multiple
orgs on multiple instances.
d. Org-wide data security determines whether other tenants can see data in multiple
orgs on the same instance. correct answers a. Governor limits prevent tenants from
impacting performance in multiple orgs on the same instance.
What is a good practice for a developer to follow when writing a trigger? (2)
a. Using @future methods to perform DML operations.
b. Using the Map data structure to hold query results by ID.
c. Using the Set data structure to ensure distinct records.
d. Using synchronous callouts to call external systems. correct answers b. Using the
Map data structure to hold query results by ID.
c. Using the Set data structure to ensure distinct records.
Which type of information is provided by the Checkpoints tab in the Developer Console?
(2)
a. Namespace
b. Time
c. Exception
,d. Debug Statements correct answers a. Namespace
b. Time
A Hierarchy Custom Setting stores a specific URL for each profile in Salesforce.
Which statement can a developer use to retrieve the correct URL for the current user's
profile and display this on a Visualforce Page?
a. {!$Setup.Url_Settings__c.Instance[Profile.Id].URL__c}
b. {!$Setup.Url_Settings__c.URL__c}
c. {!$Settings.Url_Settings__c[Profile.Id].URL__c}
d. {!$Settings.Url_Settings__c[$Profile.Id].URL__c} correct answers b. {!
$Setup.Url_Settings__c.URL__c}
What is a capability of formula fields? (3)
a. Generate a link using the HYPERLINK function to a specific record in a legacy
system.
b. Display the previous value for a field using the PRIORVALUE function.
c. Return and display a field value from another object using the VLOOKUP function.
d. Determine if a datetime field has passed using the NOW function.
e. Determine which of three different images to display using the IF function. correct
answers a. Generate a link using the HYPERLINK function to a specific record in a
legacy system.
d. Determine if a datetime field has passed using the NOW function.
e. Determine which of three different images to display using the IF function.
13. How would a developer determine if a CustomObject__c record has been manually
shared with the current user in Apex?
a. By querying the role hierarchy.
b. By calling the isShared() method for the record.
c. By querying CustomObject__Share.
d. By calling the profile settings of the current user. correct answers c. By querying
CustomObject__Share.
On which object can an administrator create a roll-up summary field?
a. Any object that is on the detail side of a master-detail relationship.
b. Any object that is on the child side of a lookup relationship.
c. Any object that is on the parent side of a lookup relationship.
d. Any object that is on the master side of a master-detail relationship. correct answers
d. Any object that is on the master side of a master-detail relationship.
Which statement should a developer avoid using inside procedural loops? (2)
a. System.debug('Amount of CPU time (in ms) used so far: ' + Limits.getCpuTime());
b. List<Contact> contacts = [SELECT id, salutation, firstname, lastname, email FROM
contact WHERE accountId = :a.Id];
c. If(o.accountid == a.id)
d. Update contactList; correct answers b. List<Contact> contacts = [SELECT id,
salutation, firstname, lastname, email FROM contact WHERE accountId = :a.Id];
, d. Update contactList;
How can a developer determine, from the DescribeSObjectResult, if the current user will
be able to create records for an object in Apex?
a. By using the IsInsertabe() method.
b. By using the IsCreatable() method.
c. By using the has Access() method.
d. By using the canCreate() method. correct answers b. By using the IsCreatable()
method.
What is an accurate statement about variable scope? (3)
a. Parallel blocks can use the same variable name
b. A variable can be defined at any point in a block.
c. Sub-blocks cannot reuse a parent block's variable name.
d. Sub-blocks can reuse a parent block's variable name if its value is null.
e. A static variable can restrict the scope to the current block if its value is null. correct
answers a. Parallel blocks can use the same variable name
b. A variable can be defined at any point in a block.
c. Sub-blocks cannot reuse a parent block's variable name.
Explanation:
A variable can be defined at any point in a block. Parallel blocks can use the same
variable name. However, sub-blocks cannot reuse the variable name of a parent block.
Which statement about the Lookup Relationship between a Custom Object and a
Standard Object is correct?
a. The Custom Object inherits security from the reference Standard Object.
b. The Lookup Relationship on the Custom Object can prevent the deletion of the
Standard Object.
c. The Custom Object will be deleted when the referenced Standard Object is deleted.
d. The Lookup Relationship cannot be marked as required on the page layout for the
Custom Object. correct answers b. The Lookup Relationship on the Custom Object can
prevent the deletion of the Standard Object.
In which order does Salesforce execute events upon saving a record?
a. Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules;
Commit
b. Validation Rules; Before triggers; After triggers Workflow Rules Assignment Rules;
Commit
c. Before Triggers; Validation Rules; After triggers; Workflow rules; Assignment Rules;
Commit
d. Validation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules;
Commit correct answers a. Before Triggers; Validation Rules; After Triggers;
Assignment Rules; Workflow Rules; Commit
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller HopeJewels. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $15.49. You're not tied to anything after your purchase.