@palerock/exam-qa 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,337 @@
1
+ {
2
+ "title": "Salesforce-Certified-Platform-Developer-1-[Set-4]",
3
+ "category": "Salesforce Dev 1",
4
+ "questions": [
5
+ {
6
+ "describe": "A developer created a Lightning Component to display a short text summary for an object and wants to use it with multiple Apex classes.\nHow should the developer design the Apex classes?",
7
+ "answerOptions": [
8
+ {
9
+ "isRight": true,
10
+ "describe": "Extend each class from the same base class that has a method getTextSummary() that returns the summary."
11
+ },
12
+ {
13
+ "isRight": false,
14
+ "describe": "Have each class define method getTextSummary() that returns the summary."
15
+ },
16
+ {
17
+ "isRight": false,
18
+ "describe": "Have each class define method getObject() that returns the sObject that is controlled by the Apex class."
19
+ },
20
+ {
21
+ "isRight": false,
22
+ "describe": "Have each class implement an interface that defines method getTextSummary() that returns the summary."
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "describe": "What are two considerations for converting a Lookup to a Master-Detail relationship?\nChoose 2 answers",
28
+ "answerOptions": [
29
+ {
30
+ "isRight": true,
31
+ "describe": "The organization-wide default changes to Controlled by Parent."
32
+ },
33
+ {
34
+ "isRight": false,
35
+ "describe": "The organization-wide default changes to Public Read/Write."
36
+ },
37
+ {
38
+ "isRight": false,
39
+ "describe": "All the null values in the Lookup field will be replaced by default values."
40
+ },
41
+ {
42
+ "isRight": true,
43
+ "describe": "If there are existing records with a null value in the Lookup field, an error will occur."
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "describe": "Which SOQL query successfully returns the Accounts grouped by name?",
49
+ "answerOptions": [
50
+ {
51
+ "isRight": false,
52
+ "describe": "SELECT Id, Type, Max(CreatedDate) FROM Account GROUP BY Name"
53
+ },
54
+ {
55
+ "isRight": true,
56
+ "describe": "SELECT Name, Max(CreatedDate) FROM Account GROUP BY Name"
57
+ },
58
+ {
59
+ "isRight": false,
60
+ "describe": "SELECT Type, Name, Max(CreatedDate) FROM Account GROUP BY Name LIMIT 5"
61
+ },
62
+ {
63
+ "isRight": false,
64
+ "describe": "SELECT Type, Max(CreatedDate) FROM Account GROUP BY Name"
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "describe": "How are debug levels adjusted in the Developer Console?",
70
+ "answerOptions": [
71
+ {
72
+ "isRight": false,
73
+ "describe": "Under the Edit menu, click Change DebugLevels."
74
+ },
75
+ {
76
+ "isRight": false,
77
+ "describe": "Under the Logs tab, click Change in the DebugLevels panel."
78
+ },
79
+ {
80
+ "isRight": true,
81
+ "describe": "Under the Debug menu > Change Log Levels..., click Add/Change in the DebugLevel Action column."
82
+ },
83
+ {
84
+ "isRight": false,
85
+ "describe": "Under the Settings menu > Trace Settings..., click Change DebugLevel."
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "describe": "What is a key difference between a Master-Detail Relationship and a Lookup Relationship?",
91
+ "answerOptions": [
92
+ {
93
+ "isRight": false,
94
+ "describe": "A Lookup Relationship is a required field on an object."
95
+ },
96
+ {
97
+ "isRight": true,
98
+ "describe": "A Master-Detail Relationship detail record inherits the sharing and security of its master record."
99
+ },
100
+ {
101
+ "isRight": false,
102
+ "describe": "When a record of a master object in a Lookup Relationship is deleted, the detail records are also deleted."
103
+ },
104
+ {
105
+ "isRight": false,
106
+ "describe": "When a record of a master object in a Master-Detail Relationship is deleted, the detail records are kept and not deleted."
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "describe": "Which three options allow a developer to use custom styling in a Visualforce page?\nChoose 3 answers",
112
+ "answerOptions": [
113
+ {
114
+ "isRight": true,
115
+ "describe": "<apex: stylesheet> tag"
116
+ },
117
+ {
118
+ "isRight": false,
119
+ "describe": "<apex: style> tag"
120
+ },
121
+ {
122
+ "isRight": false,
123
+ "describe": "<apex: stylesheets> tag"
124
+ },
125
+ {
126
+ "isRight": true,
127
+ "describe": "inline CSS"
128
+ },
129
+ {
130
+ "isRight": true,
131
+ "describe": "a static resource"
132
+ }
133
+ ]
134
+ },
135
+ {
136
+ "describe": "What are three characteristics of static methods?\nChoose 3 answers",
137
+ "answerOptions": [
138
+ {
139
+ "isRight": true,
140
+ "describe": "Initialized only when a class is loaded"
141
+ },
142
+ {
143
+ "isRight": false,
144
+ "describe": "A static variable is available outside of the scope of an Apex transaction"
145
+ },
146
+ {
147
+ "isRight": true,
148
+ "describe": "Allowed only in outer classes"
149
+ },
150
+ {
151
+ "isRight": false,
152
+ "describe": "Allowed only in inner classes"
153
+ },
154
+ {
155
+ "isRight": true,
156
+ "describe": "Are NOT transmitted as part of the view state for a Visualforce page"
157
+ }
158
+ ]
159
+ },
160
+ {
161
+ "describe": "Which tool can deploy destructive changes to Apex classes in production?",
162
+ "answerOptions": [
163
+ {
164
+ "isRight": true,
165
+ "describe": "Workbench"
166
+ },
167
+ {
168
+ "isRight": false,
169
+ "describe": "Change Sets"
170
+ },
171
+ {
172
+ "isRight": false,
173
+ "describe": "Developer Console"
174
+ },
175
+ {
176
+ "isRight": false,
177
+ "describe": "Salesforce Setup"
178
+ }
179
+ ]
180
+ },
181
+ {
182
+ "describe": "What are two ways a developer should deploy code from a developer org to an unrelated production org?\nChoose 2 answers",
183
+ "answerOptions": [
184
+ {
185
+ "isRight": false,
186
+ "describe": "Login to the production org and set the developer org as an inbound connection in the Deployment Settings screen."
187
+ },
188
+ {
189
+ "isRight": false,
190
+ "describe": "Save the code to a folder on the developer's computer, create an incoming Change Set in the production org, and upload the files directly."
191
+ },
192
+ {
193
+ "isRight": true,
194
+ "describe": "Package the code as an unmanaged package and install it in the production org."
195
+ },
196
+ {
197
+ "isRight": false,
198
+ "describe": "Setup a Salesforce to Salesforce connection and deploy a Change Set."
199
+ },
200
+ {
201
+ "isRight": true,
202
+ "describe": "Use an IDE to upload the new code directly into the production org using the metadata API."
203
+ }
204
+ ]
205
+ },
206
+ {
207
+ "describe": "A developer has a unit test that is failing. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous Apex tool. The code then executes without failing.\nWhy did the unit test fail, but not the Execute Anonymous?",
208
+ "answerOptions": [
209
+ {
210
+ "isRight": false,
211
+ "describe": "The test method uses a try/catch block."
212
+ },
213
+ {
214
+ "isRight": true,
215
+ "describe": "The test method relies on existing data in the database."
216
+ },
217
+ {
218
+ "isRight": false,
219
+ "describe": "The test method calls an @future method."
220
+ },
221
+ {
222
+ "isRight": false,
223
+ "describe": "The test method has a syntax error in the code."
224
+ }
225
+ ]
226
+ },
227
+ {
228
+ "describe": ". A developer needs to display all of the available fields for an object.\nIn which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object?\nChoose 2 answers",
229
+ "answerOptions": [
230
+ {
231
+ "isRight": true,
232
+ "describe": "Use getGlobalDescribe().get(myObject).getDescribe().fields.getMap() to return a map of fields."
233
+ },
234
+ {
235
+ "isRight": true,
236
+ "describe": "Use SObjectType.myObject.fields.getMap() to return a map of fields."
237
+ },
238
+ {
239
+ "isRight": false,
240
+ "describe": "Use Schema.describeSObjects(new String[]{myObject})[0].fields.getMap() to return a map of fields."
241
+ },
242
+ {
243
+ "isRight": false,
244
+ "describe": "Use myObject.sObjectType.getDescribe().fieldSet() to return a set of fields."
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ "describe": "What is the return data type when ApexPages.currentPage().getParameters() is used to retrieve URL parameters from a Visualforce controller?",
250
+ "answerOptions": [
251
+ {
252
+ "isRight": true,
253
+ "describe": "Map<String, String>"
254
+ },
255
+ {
256
+ "isRight": false,
257
+ "describe": "String[]"
258
+ },
259
+ {
260
+ "isRight": false,
261
+ "describe": "List<String>"
262
+ },
263
+ {
264
+ "isRight": false,
265
+ "describe": "Enum"
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "describe": "Which three declarative fields are correctly mapped to variable types in Apex?\nChoose 3 answers",
271
+ "answerOptions": [
272
+ {
273
+ "isRight": false,
274
+ "describe": "TextArea maps to List of type String"
275
+ },
276
+ {
277
+ "isRight": false,
278
+ "describe": "Number maps to Integer"
279
+ },
280
+ {
281
+ "isRight": true,
282
+ "describe": "Number maps to Decimal"
283
+ },
284
+ {
285
+ "isRight": true,
286
+ "describe": "Date/Time maps to Datetime"
287
+ },
288
+ {
289
+ "isRight": true,
290
+ "describe": "Checkbox maps to Boolean"
291
+ }
292
+ ]
293
+ },
294
+ {
295
+ "describe": "A developer is asked to create a PDF quote document formatted using the company's branding guidelines, and automatically save it to the Opportunity record.\nWhich two ways should a developer create this functionality?\nChoose 2 answers",
296
+ "answerOptions": [
297
+ {
298
+ "isRight": true,
299
+ "describe": "Create an e-mail template and use it in Process Builder."
300
+ },
301
+ {
302
+ "isRight": false,
303
+ "describe": "Install an application from the AppExchange to generate documents."
304
+ },
305
+ {
306
+ "isRight": false,
307
+ "describe": "Create a visual flow that implements the company's formatting."
308
+ },
309
+ {
310
+ "isRight": true,
311
+ "describe": "Create a Visualforce page with custom styling."
312
+ }
313
+ ]
314
+ },
315
+ {
316
+ "describe": "A developer created a Visualforce page with a custom controller to show a list of accounts. The page uses the <apex:SelectList> component, with a variable called \"selection\", to show the valid values for Account.Type. The page uses an <apex : pageBlockTable> component to display the list of accounts, where the iteration variable is \"acct\".\nThe developer wants to ensure that when a user selects a type on the <apex:selectList> component, only accounts with that type are shown on the page.\nWhat should the developer do to accomplish this?",
317
+ "answerOptions": [
318
+ {
319
+ "isRight": false,
320
+ "describe": "Add the Rendered=( !Acct.type=selection ) attribute to the pageBlockTable component."
321
+ },
322
+ {
323
+ "isRight": false,
324
+ "describe": "Create multiple lists in the controller that represent the relevant accounts for each account type when the page loads, then reference the correct one dynamically on the pageBlockTable."
325
+ },
326
+ {
327
+ "isRight": false,
328
+ "describe": "Create a component for each option and use a variable with hide parameter on the element."
329
+ },
330
+ {
331
+ "isRight": true,
332
+ "describe": "Use the onChange event to update the list of accounts in the controller when the value changes, and then re-render the pageBlockTable."
333
+ }
334
+ ]
335
+ }
336
+ ]
337
+ }
@@ -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
+ }