How would you test a web service?
Answer(s): D
Write a fake response in the doInvoke method Mark this class with an @isTest annotation. That way, it gets excluded from your org's size limit in test method, call Test.setMock(WebServiceMock.class, [mock class name])
Which of the following about Dynamic Apex is incorrect?
While you can use simple bind variables in dynamic SOQL, you cannot use bind variable fields (e.g. :myVariable.field1_c)Use escapeSingleQuotes to prevent SOQL injection
Which of the following exceptions cannot be caught and will force an error? (Choose three.)
Answer(s): A,B,E
SObjectException occurs when accessing a field not queried, or you try to change a field during the wrong dml statement (i.e. an edit-only field being set on insert)Custom exceptions must extend the "Exception" class
What is the best way to display field-level error messages in Lightning?
Answer(s): A
What is the transaction limit for SOQL queries?
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.