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?
Answer(s): C
What is a recommended practice with regard to the Apex CPU limit? (Choose two.)
Answer(s): B,C
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 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.)
Answer(s): A,C,E
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<Survey_c> createSurveys = new List<Survey_c>(); for (Case c : trigger.new){ if (c.IsClosed && (trigger.isInsert II trigger.isUpdate && trigger.oldMap.get(c.Id).IsClosed == false)){ createSurveys.add(new Survey_c(Case_c = c.Id)); } } insert createSurveys; }What could be the cause of this issue?
Post your Comments and Discuss Salesforce Certified Platform Developer II exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the Certified Platform Developer II content, but please register or login to continue.