@palerock/exam-qa 1.0.6-patch1 → 1.0.6-patch11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/index.html +1 -1
  2. package/dist/static/css/app.f76ca65020df1576514751c0b6fb2a25.css +2 -0
  3. package/dist/static/css/app.f76ca65020df1576514751c0b6fb2a25.css.map +1 -0
  4. package/dist/static/js/app.4d3c186ec6cdaa7239cb.js +2 -0
  5. package/dist/static/js/app.4d3c186ec6cdaa7239cb.js.map +1 -0
  6. package/dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map +1 -1
  7. package/lib-json/Dev1/345/237/272/347/241/200/351/242/230.json +1407 -0
  8. package/lib-json/Dev1/346/250/241/346/213/237/345/215/267A.json +1538 -0
  9. package/lib-json/Dev1/346/250/241/346/213/237/345/215/267B.json +1534 -0
  10. package/lib-json/Dev1/346/265/201/347/250/213/350/207/252/345/212/250/345/214/226/344/270/216/351/200/273/350/276/2211.json +1587 -0
  11. package/lib-json/Dev1/346/265/201/347/250/213/350/207/252/345/212/250/345/214/226/344/270/216/351/200/273/350/276/2212.json +1042 -0
  12. package/lib-json/Dev1/346/265/213/350/257/225_/350/260/203/350/257/225_/351/203/250/347/275/262.json +928 -0
  13. package/lib-json/Dev1/347/224/250/346/210/267/347/225/214/351/235/242.json +1243 -0
  14. package/lib-json/Salesforce-Admin-201-[Set-10].json +769 -0
  15. package/lib-json/Salesforce-Admin-201-[Set-1].json +604 -0
  16. package/lib-json/Salesforce-Admin-201-[Set-2].json +621 -0
  17. package/lib-json/Salesforce-Admin-201-[Set-3].json +650 -0
  18. package/lib-json/Salesforce-Admin-201-[Set-4].json +636 -0
  19. package/lib-json/Salesforce-Admin-201-[Set-5].json +640 -0
  20. package/lib-json/Salesforce-Admin-201-[Set-6].json +640 -0
  21. package/lib-json/Salesforce-Admin-201-[Set-7].json +592 -0
  22. package/lib-json/Salesforce-Admin-201-[Set-8].json +539 -0
  23. package/lib-json/Salesforce-Admin-201-[Set-9].json +539 -0
  24. package/lib-json/map.json +7 -33
  25. package/package.json +3 -2
  26. package/dist/static/css/app.d3e969a579969be885a3462a1e12e37f.css +0 -2
  27. package/dist/static/css/app.d3e969a579969be885a3462a1e12e37f.css.map +0 -1
  28. package/dist/static/js/app.53370ddfe5eba6a10565.js +0 -2
  29. package/dist/static/js/app.53370ddfe5eba6a10565.js.map +0 -1
@@ -0,0 +1,1042 @@
1
+ {
2
+ "title": "Dev1流程自动化与逻辑2",
3
+ "category": "Dev1-自由部落侠",
4
+ "questions": [
5
+ {
6
+ "describe": "<p>Refer to the following Apex code:</p><p>Integer x= 0;</p><p>do {</p><p>&nbsp; &nbsp; &nbsp;x=1;</p><p>&nbsp; &nbsp; &nbsp;x++;</p><p>}while(x&lt;1);</p><p>System.debug(x);</p><p>What is the value of x when it is written to the debug log?</p><p><br/></p>",
7
+ "answerOptions": [
8
+ {
9
+ "describe": "<p>0</p>",
10
+ "isRight": false
11
+ },
12
+ {
13
+ "describe": "<p>1</p>",
14
+ "isRight": false
15
+ },
16
+ {
17
+ "describe": "<p>2</p>",
18
+ "isRight": true
19
+ },
20
+ {
21
+ "describe": "<p>3</p>",
22
+ "isRight": false
23
+ }
24
+ ],
25
+ "hashCode": "1988675003",
26
+ "analysis": ""
27
+ },
28
+ {
29
+ "describe": "<p>Refer to the following code snippet for an environment has more than 200 Accounts belonging to the &#39;Technology&#39; industry:</p><p>for(Account thisAccount : [Select Id, Industry FROM Account LIMIT 150]){</p><p>&nbsp; &nbsp; &nbsp;if(thisAccount.Industry == &#39;Technology&#39; ){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thisAccount.Is_Tech__c = true;</p><p>&nbsp; &nbsp; &nbsp; }</p><p>update thisAccount;</p><p>}</p><p><br/></p><p>When the code executes, what happens as a result of the Apex transaction?</p><p><br/></p>",
30
+ "answerOptions": [
31
+ {
32
+ "describe": "<p>If executed in an asynchronous context, the Apex transaction is likely to fail by exceeding the DML governor limit.</p>",
33
+ "isRight": false
34
+ },
35
+ {
36
+ "describe": "<p>If executed in a synchronous context, the Apex transaction is likely to fail by exceeding the DML governor limit.</p>",
37
+ "isRight": false
38
+ },
39
+ {
40
+ "describe": "<p>The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are updated.</p>",
41
+ "isRight": false
42
+ },
43
+ {
44
+ "describe": "<p>The Apex transaction fails with the following message: Sobject row was retrieved via SOQL without querying the requested field: Account.Is_Tech__c.</p>",
45
+ "isRight": true
46
+ }
47
+ ],
48
+ "hashCode": "1988675002",
49
+ "analysis": ""
50
+ },
51
+ {
52
+ "describe": "<p>Considering the following code snippet:</p><p>public static void insertAccounts(List&lt;Account&gt; theseAccounts){</p><p>&nbsp; &nbsp; &nbsp; for(Account thisAccount : theseAccounts) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(thisAccount.website == null) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; thisAccount.website = &#39;https://www.demo.com&#39;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; &nbsp;update theseAccounts;</p><p>}</p><p>when the code executes, a DML exceptionis thrown.</p><p>How should the developer modify the code to ensure exceptions are handled gracefully?</p><p><br/></p>",
53
+ "answerOptions": [
54
+ {
55
+ "describe": "<p>Remove null items from the list of Accounts.</p>",
56
+ "isRight": false
57
+ },
58
+ {
59
+ "describe": "<p>Implement Change Data Capture.</p>",
60
+ "isRight": false
61
+ },
62
+ {
63
+ "describe": "<p>Implement the upsert DML statement.</p>",
64
+ "isRight": false
65
+ },
66
+ {
67
+ "describe": "<p>Implement a try/catch block for the DML.</p>",
68
+ "isRight": true
69
+ }
70
+ ],
71
+ "hashCode": "1988675001",
72
+ "analysis": ""
73
+ },
74
+ {
75
+ "describe": "<p>The orderHelper class is a utility class that contains business logic for processing orders. Consider the code snippet:</p><p><br/></p><p>public class without sharing OrderHelper{</p><p>//code implementation.</p><p>}</p><p><br/></p><p>A developer needs to create a constant named DELIVERY_MULTIPLIER with a value of 4.15, The valua of instant should not change at any time in the code.</p><p>How should the developer declare the DELIVERY_MULTIPLIER Constant to meet the business objectives?</p><p><br/></p>",
76
+ "answerOptions": [
77
+ {
78
+ "describe": "<p>static decimal DELIVERY MULTIPLIER =4.15;</p>",
79
+ "isRight": false
80
+ },
81
+ {
82
+ "describe": "<p>static final decimal DELIVERY MULTIPLIER =4.15;</p>",
83
+ "isRight": true
84
+ },
85
+ {
86
+ "describe": "<p>decimal DELIVERY MULTIPLIER =4.15;</p>",
87
+ "isRight": false
88
+ },
89
+ {
90
+ "describe": "<p>constant decimal DELIVERY MULTIPLIER =4.15;</p>",
91
+ "isRight": false
92
+ }
93
+ ],
94
+ "hashCode": "1988675000",
95
+ "analysis": ""
96
+ },
97
+ {
98
+ "describe": "<p>A developer wrote the following two classes:</p><p><br/></p><p>public with sharing class statusFetcher{</p><p>private Boolean active = true;</p><p>private Boolean isActive(){</p><p>return active;</p><p>}</p><p>}</p><p>public with sharing class Calculator{</p><p>public void doCalculations()</p><p>StatusFetcher sFetcher = new StatusFetcher();</p><p>if(sFetcher.isActive())</p><p>//do calculatlons here</p><p>}</p><p>&nbsp; }</p><p>}</p><p><br/></p><p>The StatusFetcher class successfully complled and saved.However, the calculator class has a compile time error.</p><p>How should the developer fix this code?</p><p><br/></p>",
99
+ "answerOptions": [
100
+ {
101
+ "describe": "<p>Make the docalculations method in the calculator class private.</p>",
102
+ "isRight": false
103
+ },
104
+ {
105
+ "describe": "<p>Change the class declaration for the calculator class to public with inherited sharing.</p>",
106
+ "isRight": false
107
+ },
108
+ {
109
+ "describe": "<p>Change the class declaration for the statusFetcher class to public with inherited sharing.</p>",
110
+ "isRight": false
111
+ },
112
+ {
113
+ "describe": "<p>Make the isActive method in the statusFetcher class public.</p>",
114
+ "isRight": true
115
+ }
116
+ ],
117
+ "hashCode": "1988674999",
118
+ "analysis": ""
119
+ },
120
+ {
121
+ "describe": "<p>Given the code below in an Apex class:</p><p><br/></p><p>List&lt;Account&gt; aList=[SELECT Id, Active_c EROM Account];</p><p>for (Account a : a List){</p><p>if[!a.Active_c){</p><p>a.Name = &#39;INACTIVE&#39;;</p><p>}</p><p>}</p><p>update aList;</p><p><br/></p><p>What should a developer do to correct the code so that there is no chance of hitting a govermorlimit?</p><p><br/></p>",
122
+ "answerOptions": [
123
+ {
124
+ "describe": "<p>Change the DML to use Database.update(aList,true);</p>",
125
+ "isRight": false
126
+ },
127
+ {
128
+ "describe": "<p>Change the DML to use Database.updiate(aList,false);</p>",
129
+ "isRight": false
130
+ },
131
+ {
132
+ "describe": "<p>Add a LIMIT clause to the SOQL statement.</p>",
133
+ "isRight": false
134
+ },
135
+ {
136
+ "describe": "<p>Add a WRERE clause to the SOQL statement.</p>",
137
+ "isRight": true
138
+ }
139
+ ],
140
+ "hashCode": "1988674998",
141
+ "analysis": ""
142
+ },
143
+ {
144
+ "describe": "<p>A lead developer creates an Apex interface called &quot;Laptop&quot;. Consider the following code snippet:</p><p><br/></p><p>public class SilverLaptop{</p><p>//code implementaticn</p><p>}</p><p><br/></p><p>How can a developer use the Laptop interface within the SilverLaptop class?</p><p><br/></p>",
145
+ "answerOptions": [
146
+ {
147
+ "describe": "<p>@Extends(class=&quot;Laptop&quot;)\npublic class SilverLaptop</p>",
148
+ "isRight": false
149
+ },
150
+ {
151
+ "describe": "<p>public class SilverLaptop extends Laptop</p>",
152
+ "isRight": false
153
+ },
154
+ {
155
+ "describe": "<p>@Interface (class=&quot;Laptop&quot;)\npublic class SilverLaptop</p>",
156
+ "isRight": false
157
+ },
158
+ {
159
+ "describe": "<p>public class SilverLaptop implements Laptop</p>",
160
+ "isRight": true
161
+ }
162
+ ],
163
+ "hashCode": "1988674997",
164
+ "analysis": ""
165
+ },
166
+ {
167
+ "describe": "<p>Management asked for opportunities to be automatically created for accounts with annual revenue greater then $1000000. A developer created the following trigger on the Account object to satisfy this requirement.</p><p>For(Account a : Trigger.new) {</p><p>&nbsp; &nbsp; &nbsp; if(a.AnnualRevenue &gt; 1000000) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List&lt;Opportunity&gt; oppList = [SELECT Id FROM Opportunity WHERE accountId = :a.Id];</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(oppList.size() ==0) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Opportunity oppty = new Opportunity(Name = a.Name, StageName = &#39;Prospecting&#39;, CloseDate = system.today().addDays(30);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insert oppty;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; }</p><p>}</p><p>Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, if fails with System.Exception errors.</p><p>Which two actions should the developer take to fix the code segment shown above? Choose 2 answers</p><p><br/></p>",
168
+ "answerOptions": [
169
+ {
170
+ "describe": "<p>Move the DML that saves opportunities outside the for loop.</p>",
171
+ "isRight": true
172
+ },
173
+ {
174
+ "describe": "<p>Use Database.query to query the opportunities.</p>",
175
+ "isRight": false
176
+ },
177
+ {
178
+ "describe": "<p>Check if all the required fields for Opportunity are being added on creation.</p>",
179
+ "isRight": false
180
+ },
181
+ {
182
+ "describe": "<p>Query for existing opportunities outside the for loop.</p>",
183
+ "isRight": true
184
+ }
185
+ ],
186
+ "hashCode": "1988674996",
187
+ "analysis": ""
188
+ },
189
+ {
190
+ "describe": "<p>A developer is building custom search functionality that uses SOSL to search account and contact records that match search terms provided by the end user. The feature is exposed through a Lightning web component, and the end user is able to provide a list of terms to search.</p><p>Consider the following code snippet:</p><p><br/></p><p>@AuraEnabled</p><p>public static List&lt;List&lt;sObject&gt;&gt; searchTerms(List&lt;String&gt; termlist){</p><p>List&lt;List&lt;sObject&gt;&gt; result = new List&lt;List&lt;sObject&gt;&gt;() :</p><p>for(string term: termList) {</p><p>result.addAl1([FIND :term IN ALL FIELDS RETURNING Account Name),</p><p>contact(FirstName,LastName)]};</p><p>}</p><p>return result;</p><p>}</p><p><br/></p><p>What is the maximum number of search terms the end user can provide to successfully execute the search without exceeding a governor limit?</p><p><br/></p>",
191
+ "answerOptions": [
192
+ {
193
+ "describe": "<p>20</p>",
194
+ "isRight": false
195
+ },
196
+ {
197
+ "describe": "<p>150</p>",
198
+ "isRight": false
199
+ },
200
+ {
201
+ "describe": "<p>200</p>",
202
+ "isRight": false
203
+ },
204
+ {
205
+ "describe": "<p>2000</p>",
206
+ "isRight": true
207
+ }
208
+ ],
209
+ "hashCode": "1988674995",
210
+ "analysis": ""
211
+ },
212
+ {
213
+ "describe": "<p>A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to include helper methods that are not used by the Web Application in the implementation of the Web Service Class.\nWhich code segment shows the correct declaration of the class and methods?</p>",
214
+ "answerOptions": [
215
+ {
216
+ "describe": "<p>webservice class WebserviceClass {\nprivate Boolean helperMethod() { /* implementation ... */ } \nwebservice static string updateRecords() { /* implementation ... */}\n}</p>",
217
+ "isRight": false
218
+ },
219
+ {
220
+ "describe": "<p>global class WebServiceClass{\nprivate Boolean helperMethod() { /* implementation ... */ }\nglobal string updateRecords() ( /* implementation ... */ }\n}</p>",
221
+ "isRight": false
222
+ },
223
+ {
224
+ "describe": "<p>global class WebServiceClass {\nprivate Boolean helperMethod() { 1* implementation ... &quot;/ }\nwebservice static string updateRecords() { 1* implementation ... */ }\n}</p>",
225
+ "isRight": true
226
+ },
227
+ {
228
+ "describe": "<p>webservice class WebServiceClass {\nprivate Boolean helperMethod() { /* implementation ... */ }\nglobal static string updateRecords() { 1* implementation ... */}\n}</p>",
229
+ "isRight": false
230
+ }
231
+ ],
232
+ "hashCode": "1988674994",
233
+ "analysis": ""
234
+ },
235
+ {
236
+ "describe": "<p>Consider the following code snippet:</p><p><br/></p><p>public static List&lt;Lead&gt; obtainAllFields(Set&lt;Id&gt; 1eadIds) {</p><p>List&lt;Lead&gt; result = new List&lt;Lead&gt;();</p><p>for(Id leadId : leadIds) {</p><p>result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId];</p><p>}</p><p>return result;</p><p>}</p><p><br/></p><p>Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement and ensure successful execution of the method?</p><p><br/></p>",
237
+ "answerOptions": [
238
+ {
239
+ "describe": "<p>Avoid executing queries without a limit clause.</p>",
240
+ "isRight": false
241
+ },
242
+ {
243
+ "describe": "<p>Avoid returning an empty List of records.</p>",
244
+ "isRight": false
245
+ },
246
+ {
247
+ "describe": "<p>Avoid using variables as query flters.</p>",
248
+ "isRight": false
249
+ },
250
+ {
251
+ "describe": "<p>Avold performing queries inside for loops.</p>",
252
+ "isRight": true
253
+ }
254
+ ],
255
+ "hashCode": "1988674972",
256
+ "analysis": ""
257
+ },
258
+ {
259
+ "describe": "<p>Given the following code snippet, that is part of a custom controller for a Visualforce page:</p><p>public void updateContact(Contact thisContact) {</p><p>&nbsp; &nbsp; &nbsp;thisContact.Is_Active__c = false;</p><p>&nbsp; &nbsp; &nbsp;try{</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; update thisContact;</p><p>&nbsp; &nbsp; &nbsp;}catch(Exception e) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String errorMessage = &#39;An error occurred while updating the Contact. &#39; + e.getMessage());</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL.errorMessage));</p><p>&nbsp; &nbsp; &nbsp;}</p><p>}</p><p>In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DML statement from being executed if the&nbsp;</p><p>current logged-in user does not have the appropriate level of access?&nbsp;</p><p>Choose 2 answers</p><p><br/></p>",
260
+ "answerOptions": [
261
+ {
262
+ "describe": "<p>Use if (thisContact.OwnerId == UserInfo.getUserId())</p>",
263
+ "isRight": false
264
+ },
265
+ {
266
+ "describe": "<p>Use if (Schema.sObjectType.Contact.isUpdatable())</p>",
267
+ "isRight": true
268
+ },
269
+ {
270
+ "describe": "<p>Use if (Schema.sObjectType.Contact.isAccessible())</p>",
271
+ "isRight": false
272
+ },
273
+ {
274
+ "describe": "<p>Use if (Schema.sObjectType.Contact.fields.Is_Active__c.isUpdateable())</p>",
275
+ "isRight": true
276
+ }
277
+ ],
278
+ "hashCode": "1988674970",
279
+ "analysis": ""
280
+ },
281
+ {
282
+ "describe": "<p>What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name &quot;UC&quot;?</p>",
283
+ "answerOptions": [
284
+ {
285
+ "describe": "<p>SELECT lead(id, name), account(id, name), contact(id, name) FROM Lead, Account, Contact WHERE Name = &#39;UC&#39;</p>",
286
+ "isRight": false
287
+ },
288
+ {
289
+ "describe": "<p>FIND &#39;UC&#39; IN Name Fields RETURNING lead (id, name), account (id, name), contact (id, name)</p>",
290
+ "isRight": true
291
+ },
292
+ {
293
+ "describe": "<p>SELECT Lead.id, Lead.Name, Account.Id, Account.Name, Contact.Id, Contact.Name FROM Lead, Account, Contact WHERE CompanyName = &#39;UC&#39;</p>",
294
+ "isRight": false
295
+ },
296
+ {
297
+ "describe": "<p>FIND &#39;UC&#39; IN CompanyName Fields RETURNING lead(id, name), account(id, name), contact(id, name)</p>",
298
+ "isRight": false
299
+ }
300
+ ],
301
+ "hashCode": "1988674969",
302
+ "analysis": ""
303
+ },
304
+ {
305
+ "describe": "<p>Example 1:</p><p>AggregateResult[ ] groupedResults = [ SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId];</p><p>for (AggregateResult ar : groupedResults)&nbsp;</p><p>{</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Campaign ID&#39; + ar.get(&#39;CampaignId&#39;));</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Average amount&#39; + ar.get(&#39;expr0&#39;));</p><p>}</p><p><br/></p><p>Example 2:</p><p>AggregateResult[ ] groupedResults = [ SELECT CampaignId, AVG(Amount) theAverage FROM Opportunity GROUP BY CampaignId];</p><p>for (AggregateResult ar : groupedResults)&nbsp;</p><p>{</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Campaign ID&#39; + ar.get(&#39;CampaignId&#39;));</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Average amount&#39; + ar.get(&#39;theAverage&#39;));</p><p>}</p><p><br/></p><p>Example 3:</p><p>AggregateResult[ ] groupedResults = [ SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId];</p><p>for (AggregateResult ar : groupedResults)&nbsp;</p><p>{</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Campaign ID&#39; + ar.get(&#39;CampaignId&#39;));</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Average amount&#39; + ar.get.AVG());</p><p>}</p><p><br/></p><p>Example 4:</p><p>AggregateResult[ ] groupedResults = [ SELECT CampaignId, AVG(Amount) theAverage FROM Opportunity GROUP BY CampaignId];</p><p>for (AggregateResult ar : groupedResults)&nbsp;</p><p>{</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Campaign ID&#39; + ar.get(&#39;CampaignId&#39;));</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Average amount&#39; + ar.theAverage);</p><p>}</p><p>Which two examples above use the System.debug statements to correctly display the results from the SOQL aggregate queries?</p><p>Choose 2 answers</p><p><br/></p>",
306
+ "answerOptions": [
307
+ {
308
+ "describe": "<p>Example 1</p>",
309
+ "isRight": true
310
+ },
311
+ {
312
+ "describe": "<p>Example 2</p>",
313
+ "isRight": true
314
+ },
315
+ {
316
+ "describe": "<p>Example 3</p>",
317
+ "isRight": false
318
+ },
319
+ {
320
+ "describe": "<p>Example 4</p>",
321
+ "isRight": false
322
+ }
323
+ ],
324
+ "hashCode": "1988674967",
325
+ "analysis": ""
326
+ },
327
+ {
328
+ "describe": "<p>Refer to the following code that runs in an Execute Anonymous block:</p><p>for( List&lt;Lead&gt; theseLeads : [SELECT LastName, Company, Email FROM Lead LIMIT 20000]) {</p><p>&nbsp; &nbsp; for(Lead thisLead : theseLeads) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(thisLead.Email == null)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; thisLead.Email = assignGenericEmail(thisLead.LastName, thisLead.Company);</p><p>&nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp;Database.Update(theseLeads, false);</p><p>}</p><p>In an environment where the full result set is returned, what is a possible outcome of this code?</p><p><br/></p>",
329
+ "answerOptions": [
330
+ {
331
+ "describe": "<p>The transaction will succeed and the first ten thousand records will be committed to the database.</p>",
332
+ "isRight": false
333
+ },
334
+ {
335
+ "describe": "<p>The total number of DML statements issued will be exceeded.</p>",
336
+ "isRight": false
337
+ },
338
+ {
339
+ "describe": "<p>The total number of records processed as a result of DML statements will be exceeded.</p>",
340
+ "isRight": true
341
+ },
342
+ {
343
+ "describe": "<p>The transaction will succeed and the full result set changes will be committed to the database.</p>",
344
+ "isRight": false
345
+ }
346
+ ],
347
+ "hashCode": "1988674966",
348
+ "analysis": ""
349
+ },
350
+ {
351
+ "describe": "<p>Given the code below:</p><p>List&lt;Account&gt; aList = [SELECT Id FROM Account];</p><p>for(Account a : aList) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp;List&lt;Contact&gt; cList = [SELECT Id FROM Contact WHERE AccountId =:a.Id];</p><p>}</p><p>What should a developer do to correct the code so that there is no chance of hitting a governor limit?</p><p><br/></p>",
352
+ "answerOptions": [
353
+ {
354
+ "describe": "<p>Add a LIMIT clause to the first SELECT SOQL statement.</p>",
355
+ "isRight": false
356
+ },
357
+ {
358
+ "describe": "<p>Rework the code and eliminate the for loop.</p>",
359
+ "isRight": false
360
+ },
361
+ {
362
+ "describe": "<p>Add a WHERE clause to the first SELECT SOQL statement.</p>",
363
+ "isRight": false
364
+ },
365
+ {
366
+ "describe": "<p>combine the two SELECT statements into a single SOQL statement.</p>",
367
+ "isRight": true
368
+ }
369
+ ],
370
+ "hashCode": "1988674964",
371
+ "analysis": ""
372
+ },
373
+ {
374
+ "describe": "<p>In the following example, which sharing context will myMethod execute when it is invoked?</p><p><br/></p><p>public Class myClass {</p><p>&nbsp; &nbsp; &nbsp;public void myMethod( ) { /* implementation */ }</p><p>}</p><p><br/></p>",
375
+ "answerOptions": [
376
+ {
377
+ "describe": "<p>Sharing rules will be inherited from the calling context.</p>",
378
+ "isRight": true
379
+ },
380
+ {
381
+ "describe": "<p>Sharing rules will not be enforced for the running user.</p>",
382
+ "isRight": false
383
+ },
384
+ {
385
+ "describe": "<p>Sharing rules will be enforced for the running user.</p>",
386
+ "isRight": false
387
+ },
388
+ {
389
+ "describe": "<p>Sharing rules will be enforced by the instantiating class.</p>",
390
+ "isRight": false
391
+ }
392
+ ],
393
+ "hashCode": "1988674963",
394
+ "analysis": "<p>https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm</p>"
395
+ },
396
+ {
397
+ "describe": "<p>A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.\nWhat is the correct definition of the Apex method?</p>",
398
+ "answerOptions": [
399
+ {
400
+ "describe": "<p>&nbsp;@InvocableMethod</p><p>&nbsp;global static List&lt;List&lt;Recommendation&gt;&gt;</p><p>&nbsp;getLevel (List&lt;ContactWrapper&gt; input)</p><p>&nbsp;{ /*implementation*/ }</p><p><br/></p>",
401
+ "isRight": true
402
+ },
403
+ {
404
+ "describe": "<p>&nbsp;@InvocableMethod</p><p>&nbsp;global List&lt;List&lt;Recommendation&gt;&gt;</p><p>&nbsp;getLevel (List&lt;ContactWrapper&gt; input)</p><p>&nbsp;{ /*implementation*/ }</p><p><br/></p>",
405
+ "isRight": false
406
+ },
407
+ {
408
+ "describe": "<p>&nbsp;@InvocableMethod</p><p>&nbsp;global Recommendation getLevel (ContactWrapper input)</p><p>&nbsp;{ /*implementation*/ }</p><p><br/></p>",
409
+ "isRight": false
410
+ },
411
+ {
412
+ "describe": "<p>&nbsp;@InvocableMethod</p><p>&nbsp;global static ListRecommendation</p><p>&nbsp;getLevel (List&lt;ContactWrapper&gt; input)</p><p>&nbsp;{ /*implementation*/ }</p><p><br/></p>",
413
+ "isRight": false
414
+ }
415
+ ],
416
+ "hashCode": "1988674290",
417
+ "analysis": "<p>https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_InvocableMethod.htm</p>"
418
+ },
419
+ {
420
+ "describe": "<p>Refer to the following code snippet for an environment has more than 200 Accounts belonging to the &#39;Technology&#39; industry:</p><p>for(Account thisAccount : [Select Id, Industry FROM Account LIMIT 150]){</p><p>&nbsp; &nbsp; &nbsp;if(thisAccount.Industry == &#39;Technology&#39; ){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thisAccount.Is_Tech__c = true;</p><p>&nbsp; &nbsp; &nbsp; }</p><p>update thisAccount;</p><p>}</p><p><br/></p><p>When the code executes which two events occur as a result of the Apex transaction?Choose 2 answers</p><p><br/></p>",
421
+ "answerOptions": [
422
+ {
423
+ "describe": "<p>If executed in a synchronous context, the apex transaction is likely to fail by exceeding the DML governor limit.</p>",
424
+ "isRight": true
425
+ },
426
+ {
427
+ "describe": "<p>The Apex transaction fails with the following message: &quot;SObject row was retrieved via SOQL without querying the requested field:Account.Is_Tech__ c&quot; .</p>",
428
+ "isRight": true
429
+ },
430
+ {
431
+ "describe": "<p>If executed in an asynchronous context, the apex transaction is likely to fail by exceeding the DML governor limit.</p>",
432
+ "isRight": false
433
+ },
434
+ {
435
+ "describe": "<p>The Apex transcation succeeds regardless of any uncaught exception and all processed accounts are updated.</p>",
436
+ "isRight": false
437
+ }
438
+ ],
439
+ "hashCode": "1988674288",
440
+ "analysis": ""
441
+ },
442
+ {
443
+ "describe": "<p>A developer wants to mark each Account in a List&lt;Account&gt; as either Active or Inactive based on the LastModifiedDate field value being more than 90 days.</p><p>Which Apex technique should the developer use?</p><p><br/></p>",
444
+ "answerOptions": [
445
+ {
446
+ "describe": "<p>A switch statement, with a for loop inside</p>",
447
+ "isRight": false
448
+ },
449
+ {
450
+ "describe": "<p>A for loop, with a switch statement inside</p>",
451
+ "isRight": false
452
+ },
453
+ {
454
+ "describe": "An if/else statement, with a for loop inside",
455
+ "isRight": false
456
+ },
457
+ {
458
+ "describe": "<p>A for loop, with an if/else statement inside</p>",
459
+ "isRight": true
460
+ }
461
+ ],
462
+ "hashCode": "1988674287",
463
+ "analysis": ""
464
+ },
465
+ {
466
+ "describe": "<p>What is the result of the following code?</p><p>Account a = new Account( );</p><p>Database. insert(a, false);</p><p><br/></p>",
467
+ "answerOptions": [
468
+ {
469
+ "describe": "<p>The record will not be created and no error will be reported .</p>",
470
+ "isRight": true
471
+ },
472
+ {
473
+ "describe": "<p>The record will be created and no error will be reported.</p>",
474
+ "isRight": false
475
+ },
476
+ {
477
+ "describe": "<p>The record will be created and a message will be in the debug log.</p>",
478
+ "isRight": false
479
+ },
480
+ {
481
+ "describe": "<p>The record will not be created and an exception will be thrown.</p>",
482
+ "isRight": false
483
+ }
484
+ ],
485
+ "hashCode": "1988674286",
486
+ "analysis": ""
487
+ },
488
+ {
489
+ "describe": "<p>The following Apex method is part of the ContactSertvice class that is called from a trigger:</p><p>public static void setBusinessUnitToEMEA(Contact thisContact){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; thisContact . Business_Unit__c = &#39;EMEA&#39;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; update thisContact;</p><p>}</p><p><br/></p><p>How should the developer modify the code to ensure best practices are met?</p><p><br/></p>",
490
+ "answerOptions": [
491
+ {
492
+ "describe": "<p>public static void setBusinessUnitToEMEA(List&lt;Contact&gt; contacts){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(Contact thisContact : contacts){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thisContact . Business_Unit__ c = &#39;EMEA&#39;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;update contacts[0];</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}&nbsp; &nbsp;</p><p>}</p><p><br/></p>",
493
+ "isRight": false
494
+ },
495
+ {
496
+ "describe": "<p>public static void setBusinessUnitToEMEA(List&lt;Contact&gt; contacts){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(Contact thisContact : contacts){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thisContact . Business_Unit__ c = &#39;EMEA&#39;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;update contacts;</p><p>}</p><p><br/></p>",
497
+ "isRight": true
498
+ },
499
+ {
500
+ "describe": "<p>public static void setBusinessUnitToEMEA(Contact thisContact){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; List&lt;Contact&gt; contacts = new list&lt;Contacts&gt;( );</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;contacts. add(thisContact. Business_Unit__c = &#39;EMEA&#39;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; update contacts;</p><p>}</p><p><br/></p>",
501
+ "isRight": false
502
+ },
503
+ {
504
+ "describe": "<p>public void setBusinessUnitToEMEA(List&lt;Contact&gt; contacts){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; contact[0]. Business_Unit__ c = &#39;EMEA&#39;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;update contacts[0];</p><p>}</p><p><br/></p>",
505
+ "isRight": false
506
+ }
507
+ ],
508
+ "hashCode": "1988674285",
509
+ "analysis": ""
510
+ },
511
+ {
512
+ "describe": "<p>What will be the output in the debug log in the event of a QueryException duing a call to the aQuery method in the following example?</p><p><br/></p><p>class myClass {</p><p>&nbsp; &nbsp;class CustomException extends QueryException&nbsp; { }</p><p>&nbsp; &nbsp;public static Account aQuery( ) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp;Account theAccount;</p><p>&nbsp; &nbsp; &nbsp; &nbsp;try {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;system. debug( &#39; Querying Accounts. &#39;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;theAccount = [SELECT Id FROM Account WHERE CreatedDate &gt; TODAY] ;</p><p>&nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; catch (CustomException eX) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system.debug(&#39; Custom Exception. &#39;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; catch (QueryException eX) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system.debug(&#39;Query Exception. &#39;);</p><p>&nbsp; &nbsp; &nbsp; }&nbsp;</p><p>&nbsp; &nbsp; &nbsp;finally {</p><p>&nbsp; &nbsp; &nbsp; &nbsp;system.debug(&#39;Done. &#39;);</p><p>&nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; return theAccount ;</p><p>&nbsp; }</p><p>}</p><p><br/></p>",
513
+ "answerOptions": [
514
+ {
515
+ "describe": "<p>Querying Accounts. Query Exception.</p>",
516
+ "isRight": false
517
+ },
518
+ {
519
+ "describe": "<p>Querying Accounts. Custom Exception. Done.</p>",
520
+ "isRight": false
521
+ },
522
+ {
523
+ "describe": "<p>Querying Accounts. Query Exeption. Done.</p>",
524
+ "isRight": true
525
+ },
526
+ {
527
+ "describe": "<p>Querying Accounts. Custom Exeption.</p>",
528
+ "isRight": false
529
+ }
530
+ ],
531
+ "hashCode": "1988674284",
532
+ "analysis": ""
533
+ },
534
+ {
535
+ "describe": "<p>What is the result of the following code snippet?</p><p><br/></p><p>public void doWork(Account acct){</p><p>&nbsp; &nbsp; &nbsp; for (Integer i = 0; i &lt;= 200; i++){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; insert acct;</p><p>&nbsp; &nbsp; &nbsp; }</p><p>&nbsp;}</p><p><br/></p>",
536
+ "answerOptions": [
537
+ {
538
+ "describe": "<p>0 Accounts are inserted.</p>",
539
+ "isRight": true
540
+ },
541
+ {
542
+ "describe": "<p>1 Account is inserted.</p>",
543
+ "isRight": false
544
+ },
545
+ {
546
+ "describe": "<p>200 Accounts are inserted.</p>",
547
+ "isRight": false
548
+ },
549
+ {
550
+ "describe": "<p>201 Acconts are inerted.</p>",
551
+ "isRight": false
552
+ }
553
+ ],
554
+ "hashCode": "1988674282",
555
+ "analysis": ""
556
+ },
557
+ {
558
+ "describe": "<p>How many Accounts will be inserted by the following block of code?</p><p><br/></p><p>for(Integer i = 0; i&lt; 500; i++){</p><p>&nbsp; &nbsp; Account a = new Account (Name= &#39;New Account &#39; +i);</p><p>&nbsp; &nbsp; insert a;</p><p>}</p><p><br/></p>",
559
+ "answerOptions": [
560
+ {
561
+ "describe": "<p>Change the DML to use Database.updiate(aList,false);</p>",
562
+ "isRight": false
563
+ },
564
+ {
565
+ "describe": "<p>0</p>",
566
+ "isRight": true
567
+ },
568
+ {
569
+ "describe": "<p>100</p>",
570
+ "isRight": false
571
+ },
572
+ {
573
+ "describe": "<p>150</p>",
574
+ "isRight": false
575
+ }
576
+ ],
577
+ "hashCode": "1988674281",
578
+ "analysis": ""
579
+ },
580
+ {
581
+ "describe": "<p>A dveloper must implement a CheckPaymentProcessor class that povides check processing payment capabilities that adhere to what is defined for payments in the PaymentProcessor interface.&nbsp;</p><p><br/></p><p>public interface PaymentProcessor {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; void pay (Decimal amount) ;</p><p>}</p><p><br/></p><p>Which is the correct implementation to use the PaymentProcessor interface class?</p><p><br/></p>",
582
+ "answerOptions": [
583
+ {
584
+ "describe": "<p>public class CheckPaymentProcessor extends PaymentProcessor&nbsp; {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; public void pay (Decimal amount) { }</p><p>}</p><p><br/></p>",
585
+ "isRight": false
586
+ },
587
+ {
588
+ "describe": "<p>public class CheckPaymentProcessor implements PaymentProcessor {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; public void pay(Decimal amount);</p><p>}</p><p><br/></p>",
589
+ "isRight": false
590
+ },
591
+ {
592
+ "describe": "<p>public class ChecpaymentProcessor extends PaymentProcessor {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; public void pay(Decimal amount);</p><p>}</p><p><br/></p>",
593
+ "isRight": false
594
+ },
595
+ {
596
+ "describe": "<p>public class CheckPaymentProcessor implements PaymentProcessor {</p><p>public void pay(Decimal amount) { }</p><p>}</p><p><br/></p>",
597
+ "isRight": true
598
+ }
599
+ ],
600
+ "hashCode": "1988674259",
601
+ "analysis": ""
602
+ },
603
+ {
604
+ "describe": "<p>A developer created a Visualforce page and custom controller to display the account type field as shown below.</p><p>Custom controller code:</p><p><br/></p><p>public with sharing class customCtrlr {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;private Account theAccount;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public String actType;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public customCtrlr( ) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; theAccount = [SELECT Id, Type FROM Account WHERE Id = :ApexPages.currentPage().getParameters().get(&#39;Id&#39;)];</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; actType = theAccount.Type;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>}</p><p>Visualforce page snippet:</p><p>The Account Type is {!actType}</p><p><br/></p><p>The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly&nbsp;</p><p>referenced on the Visualforce page, what should the developer do to correct the problem?</p><p><br/></p>",
605
+ "answerOptions": [
606
+ {
607
+ "describe": "<p>Add a getter method for the actType attribute.</p>",
608
+ "isRight": true
609
+ },
610
+ {
611
+ "describe": "Convert theAccount.Type to a String.",
612
+ "isRight": false
613
+ },
614
+ {
615
+ "describe": "<p>Add with sharing to the custom controller.</p>",
616
+ "isRight": false
617
+ },
618
+ {
619
+ "describe": "<p>Change theAccount attribute to public.</p>",
620
+ "isRight": false
621
+ }
622
+ ],
623
+ "hashCode": "1988674258",
624
+ "analysis": ""
625
+ },
626
+ {
627
+ "describe": "<p>A developer is tasked to perform a security review of the ContactSearch Apex calss that exists in the system. Within the class, the developer identifies the following method as a security threat:</p><p><br/></p><p>List&lt;Contact&gt; performSearch(String lastName){</p><p>&nbsp; &nbsp;return Database.query(&#39;SELECT Id, FirstName, LastName FROM Contact WHERE LastName Like %&#39;+lastName+&#39;%&#39; );</p><p><br/></p><p>What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2 answers</p><p><br/></p>",
628
+ "answerOptions": [
629
+ {
630
+ "describe": "<p>Use a regular expression expression on the parameter to remove special characters.</p>",
631
+ "isRight": false
632
+ },
633
+ {
634
+ "describe": "<p>Use the @ReadOnly annotation and the with sharing keyword on the class.</p>",
635
+ "isRight": false
636
+ },
637
+ {
638
+ "describe": "<p>Use variable binding and replace the dynamic query with a static SOQL.</p>",
639
+ "isRight": true
640
+ },
641
+ {
642
+ "describe": "<p>Use the escapeSingleQuotes method to sanitize the parameter before its use.</p>",
643
+ "isRight": true
644
+ }
645
+ ],
646
+ "hashCode": "1988674256",
647
+ "analysis": ""
648
+ },
649
+ {
650
+ "describe": "<p>A developer is debugging the following code to determine why Account are not being created.</p><p>Account a = new Account(Name=&#39;A&#39;);</p><p>Database.insert(a, false);</p><p><br/></p><p>How should the code be altered to help debug the issue?</p><p><br/></p>",
651
+ "answerOptions": [
652
+ {
653
+ "describe": "<p>Collect the insert method return value in a SaveResult record.</p>",
654
+ "isRight": true
655
+ },
656
+ {
657
+ "describe": "Add a System.debug() statement before the insert method.",
658
+ "isRight": false
659
+ },
660
+ {
661
+ "describe": "<p>Add a try/catch around the insert method.</p>",
662
+ "isRight": false
663
+ },
664
+ {
665
+ "describe": "<p>Set the second insert method parameter to TRUE.</p>",
666
+ "isRight": false
667
+ }
668
+ ],
669
+ "hashCode": "1988674255",
670
+ "analysis": ""
671
+ },
672
+ {
673
+ "describe": "A developer wants to retrieve the Contacts and Users with the email address 'dev@uc.com'.\nWhich SOSL statement should the developer use?",
674
+ "answerOptions": [
675
+ {
676
+ "describe": "FIND {Email = 'dev@uc.com' }\nIN Contact, User",
677
+ "isRight": false
678
+ },
679
+ {
680
+ "describe": "FIND { dev@uc.com' } IN Email\nFields RETURNTING Contact\n(Email), User (Email)",
681
+ "isRight": true
682
+ },
683
+ {
684
+ "describe": "FIND {Email = 'dev@uc.com' } \nRETURNTING Contact (Email), \nUser (Email)",
685
+ "isRight": false
686
+ },
687
+ {
688
+ "describe": "FIND Email IN Contact, User \nFOR {dev@UC.vom}",
689
+ "isRight": false
690
+ }
691
+ ],
692
+ "hashCode": "1988674254",
693
+ "analysis": ""
694
+ },
695
+ {
696
+ "describe": "<p>A developer considers the following snippet of code:</p><p><br/></p><p>Boolean isOK;</p><p>Integer x;</p><p>String theString = &#39;Hello&#39;;</p><p><br/></p><p>if(isOk == false &amp;&amp; theString == &#39;Hello&#39;){</p><p>x=1;</p><p>}else if(isOK == true &amp;&amp; theString == &#39;Hello&#39;){</p><p>x=2;</p><p>}else if(isOk == null&nbsp; &amp;&amp; theString == &#39;Hello&#39;){</p><p>x=3;</p><p>}else{</p><p>x=4;</p><p>}</p><p><br/></p><p>Based on this code, what is the value of x?</p><p><br/></p>",
697
+ "answerOptions": [
698
+ {
699
+ "describe": "<p>2</p>",
700
+ "isRight": false
701
+ },
702
+ {
703
+ "describe": "<p>1</p>",
704
+ "isRight": false
705
+ },
706
+ {
707
+ "describe": "<p>4</p>",
708
+ "isRight": false
709
+ },
710
+ {
711
+ "describe": "<p>3</p>",
712
+ "isRight": true
713
+ }
714
+ ],
715
+ "hashCode": "1988674253",
716
+ "analysis": ""
717
+ },
718
+ {
719
+ "describe": "<p>Assuming that &#39;name&#39; is a Stirng obtained by an &lt;apex:inputText&gt; tag on a Visualforce page, which two SOQL queries performed are safe from SOQL injection?Choose 2 answers</p>",
720
+ "answerOptions": [
721
+ {
722
+ "describe": "<p>String query = &#39;SELECT Id FROM Account WHERE Name LIKE \\&#39;&#39;%&#39; + name + &#39;%\\&#39;&#39;;</p><p>List&lt;Account&gt; results = Database.query(query);</p><p><br/></p>",
723
+ "isRight": false
724
+ },
725
+ {
726
+ "describe": "<p>String query = &#39;SELECT Id FROM Account WHERE Name LIKE \\&#39;&#39;%&#39; + name.noQuotes() + &#39;%\\&#39;&#39;;</p><p>List&lt;Account&gt; results = Database.query(query);</p><p><br/></p>",
727
+ "isRight": false
728
+ },
729
+ {
730
+ "describe": "<p>String query = &#39;%&#39; + name + &#39;%&#39;;</p><p>List&lt;Account&gt; results =[SELECT Id FROM Account WHERE Name LIKE :query];</p><p><br/></p>",
731
+ "isRight": true
732
+ },
733
+ {
734
+ "describe": "<p>String query = &#39;SELECT Id FROM Account WHERE Name LIKE \\&#39;&#39;%&#39; + String.escapeSingleQuotes(name) + &#39;%\\&#39;&#39;;</p><p>List&lt;Account&gt; results = Database.query(query);</p><p><br/></p>",
735
+ "isRight": true
736
+ }
737
+ ],
738
+ "hashCode": "1988674252",
739
+ "analysis": ""
740
+ },
741
+ {
742
+ "describe": "<p>A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can overrude.\nWhat is the correct implementation of the ShippingCalculator class?</p>",
743
+ "answerOptions": [
744
+ {
745
+ "describe": "<p>public abstract class ShippingCalculator{\n &nbsp; &nbsp; &nbsp; public abstract calculate(){ /*implementation*/}\n}</p>",
746
+ "isRight": false
747
+ },
748
+ {
749
+ "describe": "<p>public abstract class ShippingCalculator{\n &nbsp; &nbsp; &nbsp; public void calculate(){ /*implementation*/}\n}</p>",
750
+ "isRight": false
751
+ },
752
+ {
753
+ "describe": "<p>public abstract class ShippingCalculator{\n &nbsp; &nbsp; &nbsp; public virtual void calculate(){ /*implementation*/}\n}</p>",
754
+ "isRight": true
755
+ },
756
+ {
757
+ "describe": "<p>public abstract class ShippingCalculator{\n &nbsp; &nbsp; &nbsp; public override calculate(){ /*implementation*/}\n}</p>",
758
+ "isRight": false
759
+ }
760
+ ],
761
+ "hashCode": "1988674251",
762
+ "analysis": ""
763
+ },
764
+ {
765
+ "describe": "<p>Given the following trigger implementation:</p><p><br/></p><p>trigger leadTrigger on Lead (before update){</p><p>&nbsp; &nbsp; &nbsp; &nbsp;final ID BUSINESS_RECORDTYPEID = &#39;012500000009Qad&#39;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp;for(Lead thisLead: Trigger.new){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(thisLead.Company != null &amp;&amp; thisLead.RecordTypeId != BUSINESS_RECORDTYPEID){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thisLead.RecordTypeId = BUSINESS_RECORDTYPEID;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp;}</p><p>}</p><p><br/></p><p>The developer receivers deployment errors every time a deployment is attempted from Sandbox to Production.</p><p>What should the developer do to ensure a successful deployment?</p><p><br/></p>",
766
+ "answerOptions": [
767
+ {
768
+ "describe": "<p>Ensure BUSINESS_RECORDTYPEID is pushed as part of the deployment components.</p>",
769
+ "isRight": false
770
+ },
771
+ {
772
+ "describe": "<p>Ensure a record type with an ID of &nbsp;BUSINESS_RECORDTYPEID exists on Production prior to deployment.</p>",
773
+ "isRight": false
774
+ },
775
+ {
776
+ "describe": "<p>Ensure the deployment is validated by a System user on Production.</p>",
777
+ "isRight": false
778
+ },
779
+ {
780
+ "describe": "Ensure BUSINESS_RECORDTYPEID is retrieved using Schema Describe calls.",
781
+ "isRight": true
782
+ }
783
+ ],
784
+ "hashCode": "1988674227",
785
+ "analysis": ""
786
+ },
787
+ {
788
+ "describe": "<p>Given the following Anonymous Block:</p><p>List&lt;Case&gt; casesToUpdate = new List&lt;Case&gt;( );</p><p>for(Case thisCase : [Select Id, Status FROM Case LIMIT 50000]){</p><p>&nbsp; &nbsp; &nbsp;thiscase. Status = &#39;Working&#39;;</p><p>&nbsp; &nbsp; &nbsp;casesToUpdate. add(thisCase);</p><p>}</p><p>try{</p><p>&nbsp; Database. update(casesToUpdate, false);</p><p>}catch(Exception e){</p><p>&nbsp; System. debug(e. getMessage());</p><p>}</p><p><br/></p><p>What should a developer consider for an environment that has over 10,000 Case records?</p><p><br/></p>",
789
+ "answerOptions": [
790
+ {
791
+ "describe": "<p>The try/catch block will handle exceptions thrown by governor limits.</p>",
792
+ "isRight": false
793
+ },
794
+ {
795
+ "describe": "<p>The transaction will succeed and changes will be committed.</p>",
796
+ "isRight": false
797
+ },
798
+ {
799
+ "describe": "The try/catch block will handle any DML exceptions thrown.",
800
+ "isRight": false
801
+ },
802
+ {
803
+ "describe": "<p>The transcation will fail due to exceeding the governor limit.</p>",
804
+ "isRight": true
805
+ }
806
+ ],
807
+ "hashCode": "1988674225",
808
+ "analysis": ""
809
+ },
810
+ {
811
+ "describe": "<p>Which statement generates a list of Leads and Contacts that have a field with the phrase &#39;ACME&#39;?</p>",
812
+ "answerOptions": [
813
+ {
814
+ "describe": "<p>List&lt;sObject&gt; searchList = [FIND &quot;*ACME*&quot; IN ALL FIELDS RETURNING Contact, Lead];</p>",
815
+ "isRight": false
816
+ },
817
+ {
818
+ "describe": "<p>List&lt;List&lt;sObject&gt;&gt; searchList = [FIND &quot;*ACME*&quot; IN ALL FIELDS RETURNING Contact, Lead];</p>",
819
+ "isRight": true
820
+ },
821
+ {
822
+ "describe": "<p>List&lt;List&lt;sObject&gt;&gt; searchList = [SELECT Name, ID FROM Contact, Lead WHERE Name like &#39;%ACME%&#39;];</p>",
823
+ "isRight": false
824
+ },
825
+ {
826
+ "describe": "<p>Map&lt;sObject&gt; searchList = [FIND &quot;*ACME*&quot; IN ALL FIELDS RETURNING Contact, Lead];</p>",
827
+ "isRight": false
828
+ }
829
+ ],
830
+ "hashCode": "1988674224",
831
+ "analysis": ""
832
+ },
833
+ {
834
+ "describe": "<p>What is the maximum number of SOQL queries used by the following code?</p><p>List&lt;Account&gt; aList = [SELECT Id from Account LIMIT 5];</p><p>for(Account a : aList){</p><p>List&lt;Contact&gt; cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id];</p><p>}</p><p><br/></p>",
835
+ "answerOptions": [
836
+ {
837
+ "describe": "<p>1</p>",
838
+ "isRight": false
839
+ },
840
+ {
841
+ "describe": "<p>2</p>",
842
+ "isRight": false
843
+ },
844
+ {
845
+ "describe": "<p>6</p>",
846
+ "isRight": true
847
+ },
848
+ {
849
+ "describe": "<p>5</p>",
850
+ "isRight": false
851
+ }
852
+ ],
853
+ "hashCode": "1988674223",
854
+ "analysis": ""
855
+ },
856
+ {
857
+ "describe": "A developer needs to prevent the creation of Request records when certain exist in the system. A RequestLogic class exists that checks the conditions.\nWhat is the correct implementation?",
858
+ "answerOptions": [
859
+ {
860
+ "describe": "trigger RequestTrigger on Request (before insert){\nRequestLogic.validateRecords(trigger.new);\n}",
861
+ "isRight": true
862
+ },
863
+ {
864
+ "describe": "trigger RequestTrigger on Request (after insert){\nRequestLogic.validateRecords(trigger.new);\n}",
865
+ "isRight": false
866
+ },
867
+ {
868
+ "describe": "trigger RequestTrigger on Request (after insert){\nif(RequestLogic.isValid(Request))\nrequest.addError('Your request cannot be created at this time.');\n}",
869
+ "isRight": false
870
+ },
871
+ {
872
+ "describe": "trigger RequestTrigger on Request (before insert){\nif(RequestLogic.isValid(Request))\nrequest.addError('Your request cannot be created at this time.');\n}",
873
+ "isRight": false
874
+ }
875
+ ],
876
+ "hashCode": "1988674222",
877
+ "analysis": ""
878
+ },
879
+ {
880
+ "describe": "Given the following Apex statement:\nAccount myAccount = [SELECT Id, Name FROM Account];\nWhat occurs when more than one Account is returned by the SOQL query?",
881
+ "answerOptions": [
882
+ {
883
+ "describe": "The query fails and an error is written to the debug log.",
884
+ "isRight": false
885
+ },
886
+ {
887
+ "describe": "The first Account returned is assigned to myAccount.",
888
+ "isRight": false
889
+ },
890
+ {
891
+ "describe": "The variable, myAccount, is automatically cast to the List data type.",
892
+ "isRight": false
893
+ },
894
+ {
895
+ "describe": "An unhandled exception is thrown and the code terminates.",
896
+ "isRight": true
897
+ }
898
+ ],
899
+ "hashCode": "1988674221",
900
+ "analysis": ""
901
+ },
902
+ {
903
+ "describe": "A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces.\nPublic interface Sortable{\nvoid sort();\n}\nPublic interface Drawable{\nvoid draw();\n}\nWhich is the correct implementation?",
904
+ "answerOptions": [
905
+ {
906
+ "describe": "public class DrawList implements Sortable, implements Drawable{\n\n public void sort() { /*implementation*/ }\n\n public void draw(){ /*implementation*/ }\n\n}",
907
+ "isRight": false
908
+ },
909
+ {
910
+ "describe": "public class DrawList extends Sortable, Drawable{\n public void sort() { /*implementation*/ }\n public void draw(){ /*implementation*/ }\n}",
911
+ "isRight": false
912
+ },
913
+ {
914
+ "describe": "public class DrawList extends Sortable, extends Drawable{\n public void sort() { /*implementation*/ }\n public void draw(){ /*implementation*/ }\n}",
915
+ "isRight": false
916
+ },
917
+ {
918
+ "describe": "public class DrawList implements Sortable, Drawable{\n public void sort() { /*implementation*/ }\n public void draw(){ /*implementation*/ }\n}",
919
+ "isRight": true
920
+ }
921
+ ],
922
+ "hashCode": "1988674219",
923
+ "analysis": ""
924
+ },
925
+ {
926
+ "describe": "A developer must create a CreditCardPayment class that provides an implementation of an existing Payment class.\npublic virtual class Payment{\n public virtual void makePayment(Decimal amount) { /*implementation*/}\n}\nWhich is the correct implementation?",
927
+ "answerOptions": [
928
+ {
929
+ "describe": "public class CreditCardPayment extends Payment{\n public virtual void makePayment(Decimal amount){/*implementation*/}\n}",
930
+ "isRight": false
931
+ },
932
+ {
933
+ "describe": "public class CreditCardPayment extends Payment{\n public override void makePayment(Decimal amount){/*implementation*/}\n}",
934
+ "isRight": true
935
+ },
936
+ {
937
+ "describe": "public class CreditCardPayment implements Payment{\n public override void makePayment(Decimal amount){/*implementation*/}\n}",
938
+ "isRight": false
939
+ },
940
+ {
941
+ "describe": "public class CreditCardPayment implements Payment{\n public virtual void makePayment(Decimal amount){/*implementation*/}\n}",
942
+ "isRight": false
943
+ }
944
+ ],
945
+ "hashCode": "1988674197",
946
+ "analysis": "https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_extending.htm?search_text=virtual"
947
+ },
948
+ {
949
+ "describe": "The following Apex method is part of the ContactService class that is called from a trigger:\npublic static void setBusinessUnitToEMEA(Contact thisContact){\n thisContact.Business_Unit__c = 'EMEA';\n update thisContact;\n}\nHow should the developer modify the code to ensure best practices are met?",
950
+ "answerOptions": [
951
+ {
952
+ "describe": "public static void setBusinessUnitToEMEA(Contact thisContact){\n List<Contact> contacts = new List<Contact>();\n contacts.add(thisContact.Business_Unit__c = 'EMEA');\n update contacts;\n}",
953
+ "isRight": false
954
+ },
955
+ {
956
+ "describe": "public static void setBusinessUnitToEMEA(List<Contact> contacts){\n for(Contact thisContact : contacts){\n thisContact.Business_Unit__c = 'EMEA';\n }\n update contacts;\n}",
957
+ "isRight": true
958
+ },
959
+ {
960
+ "describe": "public static void setBusinessUnitToEMEA(List<Contact> contacts){\n for(Contact thisContact : contacts){\n thisContact.Business_Unit__c = 'EMEA';\n update contacts[0];\n } \n}",
961
+ "isRight": false
962
+ },
963
+ {
964
+ "describe": "public static void setBusinessUnitToEMEA(List<Contact> contacts){\n contacts[0].Business_Unit__c = 'EMEA';\n update contacts[0];\n}",
965
+ "isRight": false
966
+ }
967
+ ],
968
+ "hashCode": "1988674195",
969
+ "analysis": ""
970
+ },
971
+ {
972
+ "describe": "<p>A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit.</p><p>public without sharing class OpportunityService{</p><p><br/></p><p>&nbsp; &nbsp; &nbsp; public static List&lt;OpportunityLineItem&gt; getOpportunityProducts(Set&lt;Id&gt; opportunityIds){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List&lt;OpportunityLineItem&gt; oppLineItems = new List&lt;OpportunityLineItem&gt;();</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(Id thisOppId : opportunityIds){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oppLineItems. addAll([Select Id FROM OppLineItem WHERE OpportunityId = :thisOppId]);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; &nbsp; return oppLineItems;</p><p>&nbsp; &nbsp; &nbsp;}</p><p>&nbsp;}</p><p><br/></p><p>The above method might be called during a trigger execution via a Lightning component.</p><p>Which technique should be implemented to avoid reaching the governor limit?</p><p><br/></p>",
973
+ "answerOptions": [
974
+ {
975
+ "describe": "<p>Refactor the code above to perform the SOQL query only if the Set of opportunityIds contains less 100 Ids.</p>",
976
+ "isRight": false
977
+ },
978
+ {
979
+ "describe": "<p>Refactor the code above to perform only one SOQL query, filtering by the Set of opportunityIds.</p>",
980
+ "isRight": true
981
+ },
982
+ {
983
+ "describe": "<p>Use the System. Limits. getQueries( ) method to ensure the number of queries is less than 100.</p>",
984
+ "isRight": false
985
+ },
986
+ {
987
+ "describe": "<p>Use the System. Limits. getLimitQueries( ) method to ensure the number of queries is less than 100.</p>",
988
+ "isRight": false
989
+ }
990
+ ],
991
+ "hashCode": "1988674194",
992
+ "analysis": ""
993
+ },
994
+ {
995
+ "describe": "<p>A Visual Flow uses an Apex Action to provide additional information about multiple Contacts, stored in a custom class, ContactInfo. \nWhich is the correct definition of the Apex method that gets the additional information?</p>",
996
+ "answerOptions": [
997
+ {
998
+ "describe": "<p>@InvocableMethod(label=&#39;Additional Info&#39;)\npublic ContactInfo getInfo(Id contactId)\n( /*implementation*/ )</p>",
999
+ "isRight": false
1000
+ },
1001
+ {
1002
+ "describe": "<p>@InvocableMethod(label=&#39;Additional Info&#39;)\npublic static ContactInfo getInfo(Id contactId)\n(/ *implementation*/)</p>",
1003
+ "isRight": false
1004
+ },
1005
+ {
1006
+ "describe": "<p>@InvocableMethod(label=&#39;Additional Info&#39;)</p><p>public List&lt;ContactInfo&gt; getInfo(List&lt;Id&gt; contactIds)</p><p>(/ *implementation*/)</p><p><br/></p>",
1007
+ "isRight": false
1008
+ },
1009
+ {
1010
+ "describe": "<p>@InvocableMethod(label=&#39;Additional Info&#39;)</p><p>public static List&lt;ContactInfo&gt; getInfo(List&lt;Id&gt; contactIds)</p><p>(/ *implementation*/)</p><p><br/></p>",
1011
+ "isRight": true
1012
+ }
1013
+ ],
1014
+ "hashCode": "1988674192",
1015
+ "analysis": ""
1016
+ },
1017
+ {
1018
+ "describe": "<p>Given the following block of code:</p><p><br/></p><p>try{</p><p>&nbsp; List&lt;Account&gt; retrievedRecords = [SELECT Id FROM Account WHERE Website = null];</p><p>}catch(Exception e){</p><p>&nbsp; &nbsp; //manage excception logic</p><p>}</p><p><br/></p><p>What should a developer do to ensure the code execution is disrupted if the list retrievedRecords remains empty after the SOQL query?</p><p><br/></p>",
1019
+ "answerOptions": [
1020
+ {
1021
+ "describe": "<p>Check the state of the retrievedRecords variable and access the first element of the list if the variable is empty.</p>",
1022
+ "isRight": false
1023
+ },
1024
+ {
1025
+ "describe": "<p>Check the state of the retrievedRecords variable and throw a custom exception if the variable is empty.</p>",
1026
+ "isRight": true
1027
+ },
1028
+ {
1029
+ "describe": "<p>Check the state of the retrievedRecords variable and use System.assert(false) if the variable is empty.</p>",
1030
+ "isRight": false
1031
+ },
1032
+ {
1033
+ "describe": "<p>Replace the retrievedRecords variable declaration from a List of Account to a single Account.</p>",
1034
+ "isRight": false
1035
+ }
1036
+ ],
1037
+ "hashCode": "1988674250",
1038
+ "analysis": ""
1039
+ }
1040
+ ],
1041
+ "hashCode": "-302233965"
1042
+ }