@palerock/exam-qa 1.0.4 → 1.0.6-patch1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,329 @@
1
+ {
2
+ "title": "Salesforce-Certified-Platform-Developer-1-[Set-5]",
3
+ "category": "Salesforce Dev 1",
4
+ "questions": [
5
+ {
6
+ "describe": "What are two benefits of using the Lightning Component Framework?\nChoose 2 answers",
7
+ "answerOptions": [
8
+ {
9
+ "isRight": false,
10
+ "describe": "The Lightning Component Framework includes libraries for integrating with popular web services."
11
+ },
12
+ {
13
+ "isRight": true,
14
+ "describe": "Lightning components render on the client, providing performance benefits."
15
+ },
16
+ {
17
+ "isRight": true,
18
+ "describe": "Lightning Components are built using web standards, ensuring cross-browser compatibility."
19
+ },
20
+ {
21
+ "isRight": false,
22
+ "describe": "Lightning Components render on the server, ensuring greater security and access control."
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "describe": "How should a developer prevent a recursive trigger?",
28
+ "answerOptions": [
29
+ {
30
+ "isRight": false,
31
+ "describe": "Use a private Boolean variable."
32
+ },
33
+ {
34
+ "isRight": false,
35
+ "describe": "Use a trigger handler."
36
+ },
37
+ {
38
+ "isRight": false,
39
+ "describe": "Use a \"one trigger per object\" pattern."
40
+ },
41
+ {
42
+ "isRight": true,
43
+ "describe": "Use a static Boolean variable."
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "describe": "What does the context variable Trigger. old represent in an update operation?",
49
+ "answerOptions": [
50
+ {
51
+ "isRight": true,
52
+ "describe": "The previous version values of the records firing the trigger"
53
+ },
54
+ {
55
+ "isRight": false,
56
+ "describe": "The current values of the records firing the trigger"
57
+ },
58
+ {
59
+ "isRight": false,
60
+ "describe": "The same values of Trigger.new"
61
+ },
62
+ {
63
+ "isRight": false,
64
+ "describe": "A map of IDs to the old version of the record"
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "describe": "Universal Containers (UC) has an integration with its Accounting system that creates tens of thousands of Orders inside of Salesforce in a nightly batch. UC wants to add automation that can attempt to match Leads and Contacts to these Orders using the Email Address field on the insert. UC is concerned about the performance of the automation with a large data volume.\nWhich tool should UC use to automate this process?",
70
+ "answerOptions": [
71
+ {
72
+ "isRight": false,
73
+ "describe": "Process Builder"
74
+ },
75
+ {
76
+ "isRight": false,
77
+ "describe": "Workflow Rules"
78
+ },
79
+ {
80
+ "isRight": false,
81
+ "describe": "Process Builder with an Auto launched Flow"
82
+ },
83
+ {
84
+ "isRight": true,
85
+ "describe": "Apex"
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "describe": "Which type of controller should a developer use to include a list of related records for a Custom Object record on a Visualforce page without needing additional test coverage?",
91
+ "answerOptions": [
92
+ {
93
+ "isRight": false,
94
+ "describe": "List Controller"
95
+ },
96
+ {
97
+ "isRight": false,
98
+ "describe": "Custom Controller"
99
+ },
100
+ {
101
+ "isRight": false,
102
+ "describe": "Controller Extension"
103
+ },
104
+ {
105
+ "isRight": true,
106
+ "describe": "Standard Controller"
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "describe": "Where can a developer identify the time taken by each process in request using Developer Console log inspector?",
112
+ "answerOptions": [
113
+ {
114
+ "isRight": false,
115
+ "describe": "Execution Tree tab under Stack Tree panel"
116
+ },
117
+ {
118
+ "isRight": true,
119
+ "describe": "Timeline tab under Execution Overview panel"
120
+ },
121
+ {
122
+ "isRight": false,
123
+ "describe": "Save Order tab under Execution Overview panel"
124
+ },
125
+ {
126
+ "isRight": false,
127
+ "describe": "Performance Tree tab under Stack Tree panel"
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "describe": "What is the correct invocation to push code to the app sushi-prod from the command line?",
133
+ "answerOptions": [
134
+ {
135
+ "isRight": false,
136
+ "describe": "git push master"
137
+ },
138
+ {
139
+ "isRight": true,
140
+ "describe": "git push heroku master --app sushi-prod"
141
+ },
142
+ {
143
+ "isRight": false,
144
+ "describe": "heroku push --app sushi-prod"
145
+ },
146
+ {
147
+ "isRight": false,
148
+ "describe": "heroku git push master"
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "describe": "Which two Apex data types can be used to reference a Salesforce record ID dynamically? Choose 2 answers",
154
+ "answerOptions": [
155
+ {
156
+ "isRight": false,
157
+ "describe": "External ID"
158
+ },
159
+ {
160
+ "isRight": false,
161
+ "describe": "ENUM"
162
+ },
163
+ {
164
+ "isRight": true,
165
+ "describe": "String"
166
+ },
167
+ {
168
+ "isRight": true,
169
+ "describe": "sObject"
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "describe": "Given: Map<ID, Account> accountMap = new Map<ID, Account> ((SELECT Id, Name FROM Account]);\nWhat are three valid Apex loop structures for iterating through items in the collection?\nChoose 3 answers",
175
+ "answerOptions": [
176
+ {
177
+ "isRight": true,
178
+ "describe": "for (ID accountlD : accountMap. keySet ()) {....}"
179
+ },
180
+ {
181
+ "isRight": true,
182
+ "describe": "for (Account accountRecord : accountMap.values()) {....}"
183
+ },
184
+ {
185
+ "isRight": true,
186
+ "describe": "for (Integer i=0; i < accountmap. size (); i++) {....}"
187
+ },
188
+ {
189
+ "isRight": false,
190
+ "describe": "for (ID accountlD : accountMap) {....}"
191
+ },
192
+ {
193
+ "isRight": false,
194
+ "describe": "for (Account accountRecord : accountMap.keySet ()) {....}"
195
+ }
196
+ ]
197
+ },
198
+ {
199
+ "describe": "An org has a single account named 'NoContacts' that has no related contacts. Given the query:\nList<Account> accounts = [Select ID, (Select ID, Name from Contacts) from Account where Name='NoContacts'];\nWhat is the result of running this Apex?",
200
+ "answerOptions": [
201
+ {
202
+ "isRight": true,
203
+ "describe": "accounts[0].contacts is an empty list."
204
+ },
205
+ {
206
+ "isRight": false,
207
+ "describe": "accounts[0] is Null."
208
+ },
209
+ {
210
+ "isRight": false,
211
+ "describe": "accounts[0].contacts is invalid Apex."
212
+ },
213
+ {
214
+ "isRight": false,
215
+ "describe": "A QueryException is thrown."
216
+ }
217
+ ]
218
+ },
219
+ {
220
+ "describe": "Which two strategies should a developer use to avoid hitting governor limits when developing in a mul ti-tenant environment? Choose 2 answers",
221
+ "answerOptions": [
222
+ {
223
+ "isRight": false,
224
+ "describe": "Use collections to store all fields from a related object and not just minimally required fields."
225
+ },
226
+ {
227
+ "isRight": true,
228
+ "describe": "Use methods from the \"Limits\" class to monitor governor limits."
229
+ },
230
+ {
231
+ "isRight": true,
232
+ "describe": "Use SOQL for loops to iterate data retrieved from queries that return a high number of rows."
233
+ },
234
+ {
235
+ "isRight": false,
236
+ "describe": "Use variables within Apex classes to store large amounts of data."
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ "describe": "Now should a developer create a new custom exception class?",
242
+ "answerOptions": [
243
+ {
244
+ "isRight": true,
245
+ "describe": "public class CustomException extends Exception{}"
246
+ },
247
+ {
248
+ "isRight": false,
249
+ "describe": "(Exception)CustomException ex = new Exception();"
250
+ },
251
+ {
252
+ "isRight": false,
253
+ "describe": "public class CustomException implements Exception{}"
254
+ },
255
+ {
256
+ "isRight": false,
257
+ "describe": "CustomException ex = new (CustomException)Exception();"
258
+ }
259
+ ]
260
+ },
261
+ {
262
+ "describe": "Which three tools can deploy metadata to production? Choose 3 answers",
263
+ "answerOptions": [
264
+ {
265
+ "isRight": false,
266
+ "describe": "Change Set from Developer Org"
267
+ },
268
+ {
269
+ "isRight": false,
270
+ "describe": "Data Loader"
271
+ },
272
+ {
273
+ "isRight": true,
274
+ "describe": "Force.com IDE"
275
+ },
276
+ {
277
+ "isRight": true,
278
+ "describe": "Change Set from Sandbox"
279
+ },
280
+ {
281
+ "isRight": true,
282
+ "describe": "Metadata API"
283
+ }
284
+ ]
285
+ },
286
+ {
287
+ "describe": "What are the eight officially supported languages on the Heroku Platform?",
288
+ "answerOptions": [
289
+ {
290
+ "isRight": false,
291
+ "describe": "C#, C++, Node, Ruby, Java, PHP, Go, .Net"
292
+ },
293
+ {
294
+ "isRight": false,
295
+ "describe": "Node, Ruby, Java, PHP, Python. .Net, C++"
296
+ },
297
+ {
298
+ "isRight": true,
299
+ "describe": "Node, Ruby, Java, PHP, Python, Go, Scala, Clojure"
300
+ },
301
+ {
302
+ "isRight": false,
303
+ "describe": "Lisp, PHP, Node, Ruby, Scala, Haskell, Go, Erlang"
304
+ }
305
+ ]
306
+ },
307
+ {
308
+ "describe": "What is a benefit of using an after insert trigger over using a before insert trigger?",
309
+ "answerOptions": [
310
+ {
311
+ "isRight": true,
312
+ "describe": "An after insert trigger allows a developer to bypass validation rules when updating fields on the new record."
313
+ },
314
+ {
315
+ "isRight": false,
316
+ "describe": "An after insert trigger allows a developer to insert other objects that reference the new record."
317
+ },
318
+ {
319
+ "isRight": false,
320
+ "describe": "An after insert trigger allows a developer to make a callout to an external service."
321
+ },
322
+ {
323
+ "isRight": false,
324
+ "describe": "An after insert trigger allows a developer to modify fields in the new record without a query."
325
+ }
326
+ ]
327
+ }
328
+ ]
329
+ }
@@ -0,0 +1,325 @@
1
+ {
2
+ "title": "Salesforce-Certified-Platform-Developer-1-[Set-6]",
3
+ "category": "Salesforce Dev 1",
4
+ "questions": [
5
+ {
6
+ "describe": "What is the result of the debug statements in testMethod3 when you create test data using testsetup in below code?\n@isTest\nprivate class CreateAndExecuteTest{\n@testSetup\nstatic void setup() {\n// Create 2 test accounts\nList<Account> testAccts = new List<Account>();\nfor(Integer i=0;i<2;i++) {\ntestAccts.add(new Account(Name = 'MyTestAccount'+i, Phone='333-878'+i));\n}\ninsert testAccts;\n}\n@isTest static void testMethod1() {\nAccount acc = [SELECT Id,Phone FROM Account WHERE Name='MyTestAccount0' LIMIT 1]; acc.Phone = '888-1515';\nupdate acc;\nAccount acc2 = [SELECT Id,Phone FROM Account WHERE Name='MyTestAccount1' LIMIT 1]; acc2.Phone = '999-1515';\nupdate acc2;\n}\n@isTest static void testMethod2() {\nAccount acc = [SELECT Id,Phone FROM Account WHERE Name='MyTestAccount1' LIMIT 1]; acc.Phone = '999-2525';\nupdate acc;\n}\n@isTest static void testMethod3() {\nAccount acc0 = [SELECT Id, Phone FROM Account WHERE Name='MyTestAccount0' LIMIT 1]; Account acc1 = [SELECT Id, Phone FROM Account WHERE Name='MyTestAccount1' LIMIT 1];\nSystem.debug('Account0.Phone='+ acc0.Phone +', Account1.Phone='+acc1.Phone);\n}\n}",
7
+ "answerOptions": [
8
+ {
9
+ "isRight": false,
10
+ "describe": "Account0.Phone=888-1515, Accountl.Phone=999-2525"
11
+ },
12
+ {
13
+ "isRight": false,
14
+ "describe": "Account0.Phone=333-8781, Accountl.Phone=333-8780"
15
+ },
16
+ {
17
+ "isRight": true,
18
+ "describe": "Account0.Phone=333-8780, Accountl.Phone=333-8781"
19
+ },
20
+ {
21
+ "isRight": false,
22
+ "describe": "Account0.Phone=888-1515, Accountl.Phone=999-1515"
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "describe": "While writing a test class that covers an OpportunityLineitem trigger, a Developer is unable to create a standard PriceBook since one already exists in the org.\nHow should the Developer overcome this problem?",
28
+ "answerOptions": [
29
+ {
30
+ "isRight": false,
31
+ "describe": "Use @isTest (SeeAllData=true) and delete the existing standard PriceBook."
32
+ },
33
+ {
34
+ "isRight": true,
35
+ "describe": "Use Test. getStandardPricebookId() to get the standard PriceBook ID."
36
+ },
37
+ {
38
+ "isRight": false,
39
+ "describe": "Use Test.loadData () and a Static Resource to load a standard PriceBook."
40
+ },
41
+ {
42
+ "isRight": false,
43
+ "describe": "Use @Testvisible to allow the test method to see the standard PriceBook."
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "describe": "Using the Schema Builder, a developer tries to change the API name of a field that is referenced in an Apex test class.\nWhat is the end result?",
49
+ "answerOptions": [
50
+ {
51
+ "isRight": false,
52
+ "describe": "The API name of the field is changed, and a warning is issued to update the class."
53
+ },
54
+ {
55
+ "isRight": true,
56
+ "describe": "The API name is not changed and there are no other impacts."
57
+ },
58
+ {
59
+ "isRight": false,
60
+ "describe": "The API name of the field and the reference in the test class is changed."
61
+ },
62
+ {
63
+ "isRight": false,
64
+ "describe": "The API name of the field and the reference in the test class is updated."
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "describe": "Which approach should be used to provide test data for a test class?",
70
+ "answerOptions": [
71
+ {
72
+ "isRight": true,
73
+ "describe": "Use a test data factory class to create test data."
74
+ },
75
+ {
76
+ "isRight": false,
77
+ "describe": "Query for existing records in the database."
78
+ },
79
+ {
80
+ "isRight": false,
81
+ "describe": "Execute anonymous code blocks that create data."
82
+ },
83
+ {
84
+ "isRight": false,
85
+ "describe": "Access data in @Testvisibie class variables."
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "describe": "A developer created a Visualforce page and a custom controller with methods to handle different buttons and events that can occur on the page.\nWhat should the developer do to deploy to production?",
91
+ "answerOptions": [
92
+ {
93
+ "isRight": false,
94
+ "describe": "Create a test page that provides coverage of the custom controller."
95
+ },
96
+ {
97
+ "isRight": false,
98
+ "describe": "Create a test class that provides coverage of the Visualforce page."
99
+ },
100
+ {
101
+ "isRight": false,
102
+ "describe": "Create a test page that provides coverage of the Visualforce page."
103
+ },
104
+ {
105
+ "isRight": true,
106
+ "describe": "Create a test class that provides coverage of the custom controller."
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "describe": "What is a requirement for a class to be used as a custom Visualforce controller?",
112
+ "answerOptions": [
113
+ {
114
+ "isRight": false,
115
+ "describe": "Any top-level Apex class that extends a PageReference"
116
+ },
117
+ {
118
+ "isRight": true,
119
+ "describe": "Any top-level Apex class that has a default, no-argument constructor"
120
+ },
121
+ {
122
+ "isRight": false,
123
+ "describe": "Any top-level Apex class that has a constructor that returns a PageReference"
124
+ },
125
+ {
126
+ "isRight": false,
127
+ "describe": "Any top-level Apex class that implements the controller interface"
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "describe": "Which statement results in an Apex compiler error?",
133
+ "answerOptions": [
134
+ {
135
+ "isRight": false,
136
+ "describe": "Date d1= Date. Today(), d2 = Date . Valueof ( ' 2018-01-01' );"
137
+ },
138
+ {
139
+ "isRight": true,
140
+ "describe": "List<string> s = List<string> {' a ', 'b ', 'c'};"
141
+ },
142
+ {
143
+ "isRight": false,
144
+ "describe": "Integer a=5, b=6, c, d = 7;"
145
+ },
146
+ {
147
+ "isRight": false,
148
+ "describe": "Map<Id, Lead> lmap = new Map<id, Lead> ( [Select ID from Lead Limit 8]);"
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "describe": "83. Which two platform features allow for the use of unsupported languages?\nChoose 2 answers",
154
+ "answerOptions": [
155
+ {
156
+ "isRight": false,
157
+ "describe": "app.json"
158
+ },
159
+ {
160
+ "isRight": false,
161
+ "describe": "Heroku ACM"
162
+ },
163
+ {
164
+ "isRight": true,
165
+ "describe": "Docker"
166
+ },
167
+ {
168
+ "isRight": true,
169
+ "describe": "Buildpacks"
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "describe": "What are two benefits of the Lightning Component framework?\nChoose 2 answers",
175
+ "answerOptions": [
176
+ {
177
+ "isRight": true,
178
+ "describe": "It promotes faster development using out-of-the-box components that are suitable for desktop and mobile devices."
179
+ },
180
+ {
181
+ "isRight": false,
182
+ "describe": "It simplifies complexity when building pages, but not applications."
183
+ },
184
+ {
185
+ "isRight": true,
186
+ "describe": "It provides an event-driven architecture for better decoupling between components."
187
+ },
188
+ {
189
+ "isRight": false,
190
+ "describe": "It allows faster PDF generation with Lightning components."
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "describe": "What is a capability of the <ltng:require> tag that is used for loading external Javascript libraries in Lightning Components?\nChoose 3 answers",
196
+ "answerOptions": [
197
+ {
198
+ "isRight": true,
199
+ "describe": "Loading externally hosted scripts."
200
+ },
201
+ {
202
+ "isRight": true,
203
+ "describe": "One-time loading for duplicate scripts."
204
+ },
205
+ {
206
+ "isRight": true,
207
+ "describe": "Specifying loading order."
208
+ },
209
+ {
210
+ "isRight": false,
211
+ "describe": "Loading files from Documents."
212
+ },
213
+ {
214
+ "isRight": false,
215
+ "describe": "Loading scripts in parallel."
216
+ }
217
+ ]
218
+ },
219
+ {
220
+ "describe": "When an Account's custom picklist field called Customer Sentiment is changed to a value of \"Confused,\" a new related Case should automatically be created.\nWhich two methods should a developer use to create this case? Choose 2 answers",
221
+ "answerOptions": [
222
+ {
223
+ "isRight": true,
224
+ "describe": "Apex Trigger"
225
+ },
226
+ {
227
+ "isRight": false,
228
+ "describe": "Workflow Rule"
229
+ },
230
+ {
231
+ "isRight": true,
232
+ "describe": "Process Builder"
233
+ },
234
+ {
235
+ "isRight": false,
236
+ "describe": "Custom Button"
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ "describe": "Which approach should a developer use to add pagination to a Visualforce page?",
242
+ "answerOptions": [
243
+ {
244
+ "isRight": false,
245
+ "describe": "the extensions attribute for a page"
246
+ },
247
+ {
248
+ "isRight": false,
249
+ "describe": "a StandardController"
250
+ },
251
+ {
252
+ "isRight": false,
253
+ "describe": "the action attribute for a page"
254
+ },
255
+ {
256
+ "isRight": true,
257
+ "describe": "a StandardSetController"
258
+ }
259
+ ]
260
+ },
261
+ {
262
+ "describe": "Which set of roll-up types are available when creating a roll-up summary field?",
263
+ "answerOptions": [
264
+ {
265
+ "isRight": false,
266
+ "describe": "AVERAGE, COUNT, SUM, MIN, MAX"
267
+ },
268
+ {
269
+ "isRight": true,
270
+ "describe": "COUNT, SUM, MIN, MAX"
271
+ },
272
+ {
273
+ "isRight": false,
274
+ "describe": "SUM, MIN, MAX"
275
+ },
276
+ {
277
+ "isRight": false,
278
+ "describe": "AVERAGE, SUM, MIN, MAX"
279
+ }
280
+ ]
281
+ },
282
+ {
283
+ "describe": "Which tool allows a developer to send requests to the Salesforce REST APIs and view the responses?",
284
+ "answerOptions": [
285
+ {
286
+ "isRight": true,
287
+ "describe": "Workbench REST Explorer"
288
+ },
289
+ {
290
+ "isRight": false,
291
+ "describe": "Force.com IDE REST Explorer tab"
292
+ },
293
+ {
294
+ "isRight": false,
295
+ "describe": "Developer Console REST tab"
296
+ },
297
+ {
298
+ "isRight": false,
299
+ "describe": "REST resource path URL"
300
+ }
301
+ ]
302
+ },
303
+ {
304
+ "describe": "In a single record, a user selects multiple values from a multi-select picklist.\nHow are the selected values represented in Apex?",
305
+ "answerOptions": [
306
+ {
307
+ "isRight": false,
308
+ "describe": "As a string with each value separated by a comma"
309
+ },
310
+ {
311
+ "isRight": false,
312
+ "describe": "As a set<string> with each value as an element in the set"
313
+ },
314
+ {
315
+ "isRight": false,
316
+ "describe": "As a List<String> with each value as an element in the list"
317
+ },
318
+ {
319
+ "isRight": true,
320
+ "describe": "As a string with each value separated by a semicolon"
321
+ }
322
+ ]
323
+ }
324
+ ]
325
+ }