A developer wants to write a generic Apex method that will compare the Salesforce Name field between any two object records. For example, to compare the Name field of an Account and an Opportunity; or the Name of an Account and a Contact.
How should the developer do this?
A. Use a String.replace( ) method to parse the contents of each Name field.
B. Invoke a Schema,describe() function to compare the values of each Name field.
C. Cast each object into an sObject and use sObject.get(Name') to compare the Name fields.
D. Use the salesforce metadata API to extract the value of each object and compare the name fields
When calling a RESTful web service, a developer receives a JSON payload that has a data hierarchy that is nested three levels deep. How can the developer describe the external data?
A. Deserialize the data untyped and then process it.
B. Declare a class with three levels and deserialize the JSON typed with this class.
C. Use the ANT migration tool, the custom metadata API, or the Dataloader.
D. Use middleware to flatten the JSON and consume it as a new custom object.
Which technique can run logic when an Aura Component is loaded?
A. Use an aura:handler `init'' event to call a function.
B. Use the connectedCallback(0 method.
C. Use the standard doinit function in the controller.
D. Call $A. enqueueAction passing in the method to call.
A company has an Apex process that makes multiple extensive database operations and web service callouts. The database processes and web services can take a long time to run and must be run sequentially.
How should the developer write this Apex code without running into governor limits and system limitations?
A. Use Limits class to stop entire process once governor limits are reached.
B. Use multiple @future methods for each process and callout.
C. Use Queueable Apex to chain the jobs to run sequentially.
D. Use Apex Scheduler to scheduled each process.
A developer is integrating with a legacy on-premise SQL database.
What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?
A. External Object
B. Lookup field
C. Formula field
D. External id field
A developer wrote a test class that successfully asserts a trigger on Account. It fires and updates data correctly in a sandbox environment. A salesforce admin with a custom profile attempts to deploy this trigger via a change set into the
production environment, but the test class fails with an insufficient privileges error.
What should a developer do to fix the problem?
A. Add system.runAd ( ) to the best class to execute the trigger as a user with the correct object permissions.
B. Configure the production environment to enable `'Run All tests as Admin User.''
C. Verify that Test, statement ( ) is not inside a For loop in the test class.
D. Add seeAllData=true to the test class to work within the sharing model for the production environment.
A developer has a requirement to query three fields (Id, Name, Type) from an Account and First and Last names for all Contacts associated with the Account.
Which option is the preferred optimized method to achieve this for the Account named `Ozone Electronics'?
A. Account a = [SELECT ID, Name, Type FROM Account WHERE name=`Ozone Electronics']; list lContacts = [SELECT firstname, lastname FROM Contact WHERE accounted=:a.ID];
B. Account a = [SELECT ID, Name, Type, (SELECT FirstName, LastName FROM Contacts) FROM Account WHERE name=`Ozone Electronics' LIMIT 1];
C. list lContacts = new list(); for (Contact c :[SELECT firstname, lastname, Account.Name, Account.ID, Account.Type FROM Contact WHERE Account.Name=`ozone electronics']) ( lContacts.add(c); )
D. list lAccounts = [SELECT ID, Name, Type FROM Account JOIN (SELECT ID, firstname, lastname FROM Contact WHERE contact.account.name = `ozone electronics')];
Consider the following code snippet, depicting an Aura component:
Which two interfaces can the developer implement to make the component available as a quick action? (Choose two.)
A. Force:lightningQuicAction
B. Force:hasRecordId
C. Force hasObjectName
D. Lightning QuickActionAPI
E. Force:lightningQuickActionWithoutHeader
Universal Containers stores user preferences in a Hierarchy Custom Setting, User_prefs_c, with a Checkbox field, show_Help_c, Company-Level defaults are stored at the organizational level, but may be overridden at the user level, If a user
has not overridden preferences, then the defaults should be used.
How should the Show_Help_c preference be retrieved for the current user?
A. Boolean show = User_Prefs_c, getinstance( ), Show_Help _c;
B. Boolean show = User_Prefs_c, getValues ( ). Show _Help_c;
C. Boolean show = User_Prefs_c, getvaluesUserInfo.getUserid() ).Show_Help_c;
D. Boolean show = User prefs_c, Show_Help_c;
An org has a requirement that addresses on Contacts and Accounts should be normalized to a company standard by Apex code any time that they are saved.
What is the optimal way to implement this?
A. Apex trigger on Account that calls the Contact trigger to normalize the address
B. Apex trigger on Contact that calls the Account trigger to normalize the address
C. Apex trigger on Account that and Account that normalized the address
D. Apex trigger on Account and Account that call a helper class to normalize the address
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.