Assuming that `name; is a String obtained by an
A. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name.noQuotes() + '%\''; List
B. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + String.escapeSingleQuotes(name) + '%\'';List
C. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name + '%\''; List
D. String query = '%' + name + '%';List
What is the minimum log level needed to see user-generated debug statements?
A. DEBUG
B. FINE
C. INFO
D. WARN
A developer has the following code:try {List nameList;Account a;String s = a.Name;nameList.add(s);} catch (ListException le ) {System.debug(' List Exception ');} catch (NullPointerException npe) {System.debug('NullPointer Exception ');} catch (Exception e) {System.debug(' Generic Exception ');}
What message will be logged?
A. List Exception
B. NullPointer Exception
C. Generic Exception
D. No message is logged
What is a good practice for a developer to follow when writing a trigger? (Choose 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.
Which statement should a developer avoid using inside procedural loops? (Choose 2)
A. System.debug('Amount of CPU time (in ms) used so far: ' + Limits.getCpuTime() );
B. List contacts = [SELECT Id, Salutation, FirstName, LastName, Email FROM Contact WHERE AccountId = :a.Id];
C. If(o.accountId == a.id)
D. Update contactList;
What is a capability of a StandardSetController?Choose 2 answers
A. It allows pages to perform mass updates of records
B. It allows pages to perform pagination with large record sets
C. It enforces field-level security when reading large record sets
D. It extends the functionality of a standard or custom controller
A developer wants to list all of the Tasks for each Account on the Account detail page. When a task is created for a Contact, what does the developer need to do to display the Task on the related Account record?
A. Nothing. The task is automatically displayed on the Account page.
B. Nothing. The Task cannot be related to an Account and a Contact.
C. Create a Workflow rule to relate the Task to the Contact's Account.
D. Create an Account formula field that displays the Task information.
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.
What would a developer do to accomplish this task? Choose 2 answers
A. Create a roll -up summary field on the Candidate object that counts Interview records.
B. Create a master -detail relationship between the Candidate and Interview objects.
C. Create a lookup relationship between the Candidate and Interview objects.
D. Create a trigger on the Interview object that updates a field on the Candidate object.
A developer creates a custom controller and custom Visualforce page by using the following code block:public class myController {public String myString;public String getMyString() {return 'getmyString';}public String getStringMethod1() {return myString;}public String getStringMethod2() {if (myString == null)myString = 'Method2';return myString;}}{!myString}, {!StringMethod1}, {!StringMethod2}, {!myString}
What does the user see when accessing the custom page?
A. GetMyString , , Method2 , getMystring
B. , , Method2 , getMyString
C. , , Method2,
D. GetMyString , , ,
A developer has a block of code that omits any statements that indicate whether the code block should execute with or without sharing. What will automatically obey the organization-wide defaults and sharing settings for the user who executes the code in the Salesforce organization?
A. Apex Triggers
B. HTTP Callouts
C. Apex Controllers
D. Anonymous Blocks
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Salesforce exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your PDI exam preparations and Salesforce certification application, do not hesitate to visit our Vcedump.com to find your solutions here.