A developer writes the following Apex trigger so that when a Case is closed, a single Survey record is created for that Case. The issue is that multiple Survey_c records are being created per Case.
trigger CaseTrigger on Case (after insert, after update){ List
What could be the cause of this issue?
A. A user is creating the record as Closed
B. A workflow rule is firing with a Create Task action
C. A workflow rule is firing with a Field Update action
D. A user is editing the record multiple times
A developer has built a multi-page wizard using a single Custom Controller to query and update data. Users are complaining that the pages are loading slowly.
What will improve performance? (Choose three.)
A. Reducing the view state
B. Using actionRegion and rerender
C. Turning off the standard stylesheet
D. Setting the Apex Page attribute cache=true
E. Using selective queries
A developer wants to create a Visualforce page that allows a user to search for a given account by Name. If the account is found, the account details should be populated on screen. If no account is found, an error message should be
displayed to the user.
How can this be accomplished? (Choose two.)
A. Use the (apex: information) tag to display the error message
B. Use the ApexPages.addMessage() method to add the error message
C. Use the
D. Use the accountaddErrorQ method to add the error message
What is a recommended practice with regard to the Apex CPU limit? (Choose two.)
A. Optimize SOQL query performance
B. Use Map collections to cache sObjects
C. Avoid nested Apex iterations
D. Reduce view state in Visualforce pages
1 Contact con = new Contact( LastName ='Smith', Department = 'Admin')
2 insert con;
3 Contact insertedContact=[select Name from Contact where id=:con.Id];
4 Savepoint sp_admin = Database.setSavepoint();
5 con.Department = 'HR';
6 update con;
7 Database.rollback(sp_admin);
8 System.debug(Limits.getDmlStatements());
Given the following code, what value will be output in the logs by line #8?
A. 5
B. 3
C. 4
D. 2
A developer is writing a Visualforce page to display a list of all of the checkbox fields found on a custom object. What is the recommended mechanism the developer should use to accomplish this?
A. Schema Class
B. Apex API
C. Schema Builder
D. Metadata API
A developer has created a Team Member sObject that has a Master-Detail relationship to a Project sObject and a Lookup relationship to the User sObject. The developer must ensure that a User listed on a Team Member record has Read-Write access to the parent Project record. How can the developer accomplish this if the Project sObject has a Private sharing model and thousands of Project records?
A. Create a Controller that uses the Without Sharing keyword
B. Create a Criteria-Based Sharing Rule on the Project sObject
C. Create a Team Member Trigger that inserts Project_Share records
D. Create a Project Sharing Rule that shares to the Team Member Group
Which statement is true about using ConnectApi namespace (also called Chatter in Apex)? (Choose two.)
A. Chatter in Apex methods honor the 'with sharing' and 'without sharing' keywords
B. Chatter in Apex operations are synchronous, and they occur immediately
C. Chatter in Apex methods do not run in system mode; they run in the context of the current user
D. Many test methods related to Chatter in Apex require the IsTest (SeeAIIData=true) annotation
A developer receives a LimitException: Too many query rows: 50001 error when running code. What debugging approach using the Developer Console provides the fastest and most accurate mechanism to identify a specific component that may be returning an unexpected number of rows?
A. Count the number of Row Limit warning messages in the Debug Logs
B. Add System.debug(System.getQueryRows()) to the code to track SOQL usage
C. Filter the Debug Log on SOQL_EXECUTE_END statements to track the results of each SOQL Query
D. Use the Execution Overview to see the number of rows returned by each Executed Unit
Consider the following code snippet:
Users of this Visualforce page complain that the page does a full refresh every time the Search button is pressed.
What should the developer do to ensure that a partial refresh is made so that only the section identified with opportunity List is re-drawn on the screen?
A. Ensure the lotion method search returns null.
B. Implement the rerendered attribute on the
C. Enclose the DATA table within the
D. Implement the
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 PDII exam preparations and Salesforce certification application, do not hesitate to visit our Vcedump.com to find your solutions here.