@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,321 @@
1
+ {
2
+ "title": "Salesforce-Certified-Platform-Developer-1-[Set-3]",
3
+ "category": "Salesforce Dev 1",
4
+ "questions": [
5
+ {
6
+ "describe": "A sales manager wants to make sure that whenever an opportunity stage is changed to \"Closed Won,\" a new case will be created for the support team to collect necessary information from the customer.\nHow should a developer accomplish this?",
7
+ "answerOptions": [
8
+ {
9
+ "isRight": false,
10
+ "describe": "Create a lookup field to the Case object on the opportunity object."
11
+ },
12
+ {
13
+ "isRight": false,
14
+ "describe": "Set up a validation rule on the Opportunity.Stage."
15
+ },
16
+ {
17
+ "isRight": false,
18
+ "describe": "Create a workflow rule to create the new case."
19
+ },
20
+ {
21
+ "isRight": true,
22
+ "describe": "Create a Process Builder to create the new case."
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "describe": "A developer wants to override a button using Visualforce on an object.\nWhat is the requirement?",
28
+ "answerOptions": [
29
+ {
30
+ "isRight": false,
31
+ "describe": "The controller or extension must have a PageReference method."
32
+ },
33
+ {
34
+ "isRight": false,
35
+ "describe": "The object record must be instantiated in a controller or extension."
36
+ },
37
+ {
38
+ "isRight": true,
39
+ "describe": "The standardController attribute must be set to the object."
40
+ },
41
+ {
42
+ "isRight": false,
43
+ "describe": "The action attribute must be set to a controller method."
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "describe": "Which collection type provides unique key/value pairings of data?",
49
+ "answerOptions": [
50
+ {
51
+ "isRight": true,
52
+ "describe": "Map"
53
+ },
54
+ {
55
+ "isRight": false,
56
+ "describe": "Array"
57
+ },
58
+ {
59
+ "isRight": false,
60
+ "describe": "List"
61
+ },
62
+ {
63
+ "isRight": false,
64
+ "describe": "Set"
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "describe": "A method is passed a list of generic sObjects as a parameter.\nWhat should the developer do to determine which object type (Account, Lead, or Contact, for example) to cast each sObject?",
70
+ "answerOptions": [
71
+ {
72
+ "isRight": false,
73
+ "describe": "Use the first three characters of the sObject ID to determine the sObject type."
74
+ },
75
+ {
76
+ "isRight": true,
77
+ "describe": "Use the getSObjectType method on each generic sObject to retrieve the sObject token."
78
+ },
79
+ {
80
+ "isRight": false,
81
+ "describe": "Use a try-catch construct to cast the sObject into one of the three sObject types."
82
+ },
83
+ {
84
+ "isRight": false,
85
+ "describe": "Use the getSObjectName method on the sObject class to get the sObject name."
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "describe": "What are two considerations for custom Apex Exception classes?\nChoose 2 answers",
91
+ "answerOptions": [
92
+ {
93
+ "isRight": true,
94
+ "describe": "Custom Exception class names must end with the word 'Exception'."
95
+ },
96
+ {
97
+ "isRight": true,
98
+ "describe": "Custom Exception classes must extend the base Exception class."
99
+ },
100
+ {
101
+ "isRight": false,
102
+ "describe": "Custom Exceptions cannot be extended by other Exception classes."
103
+ },
104
+ {
105
+ "isRight": false,
106
+ "describe": "Constructor for custom Exceptions can only accept string values as arguments."
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "describe": "In which two org types can a developer create new Apex classes?\nChoose 2 answers",
112
+ "answerOptions": [
113
+ {
114
+ "isRight": true,
115
+ "describe": "Sandbox"
116
+ },
117
+ {
118
+ "isRight": true,
119
+ "describe": "Developer Edition"
120
+ },
121
+ {
122
+ "isRight": false,
123
+ "describe": "Enterprise Edition"
124
+ },
125
+ {
126
+ "isRight": false,
127
+ "describe": "Unlimited Edition"
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "describe": "When viewing a Quote, the sales representative wants to easily see how many discounted items are included in the Quote Line Items.\nWhat should a developer do to meet this requirement?",
133
+ "answerOptions": [
134
+ {
135
+ "isRight": false,
136
+ "describe": "Create a trigger on the Quote object that queries the Quantity field on discounted Quote Line Items."
137
+ },
138
+ {
139
+ "isRight": false,
140
+ "describe": "Create a formula field on the Quote object that performs a SUM on the Quote Line Item Quantity field, filtered for only discounted Quote Line Items."
141
+ },
142
+ {
143
+ "isRight": false,
144
+ "describe": "Create a Workflow Rule on the Quote Line Item object that updates a field on the parent Quote when the item is discounted."
145
+ },
146
+ {
147
+ "isRight": true,
148
+ "describe": "Create a roll-up summary field on the Quote object that performs a SUM on the Quote Line Item Quantity field, filtered for only discounted Quote Line Items."
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "describe": "When are code coverage calculations updated?",
154
+ "answerOptions": [
155
+ {
156
+ "isRight": true,
157
+ "describe": "When unit tests are run on an organization."
158
+ },
159
+ {
160
+ "isRight": false,
161
+ "describe": "When Apex code is saved."
162
+ },
163
+ {
164
+ "isRight": false,
165
+ "describe": "When a deployment is validated."
166
+ },
167
+ {
168
+ "isRight": false,
169
+ "describe": "When changes are made to an organization's configuration."
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "describe": "A developer is creating test coverage for a class and needs to insert records to validate functionality.\nWhich method annotation should be used to create records for every method in the test class?",
175
+ "answerOptions": [
176
+ {
177
+ "isRight": false,
178
+ "describe": "@isTest(SeeAllData=true)"
179
+ },
180
+ {
181
+ "isRight": false,
182
+ "describe": "@BeforeTest"
183
+ },
184
+ {
185
+ "isRight": false,
186
+ "describe": "@PreTest"
187
+ },
188
+ {
189
+ "isRight": true,
190
+ "describe": "@TestSetup"
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "describe": "Which two are true regarding Apache Kafka on Heroku?\nChoose 2 answers",
196
+ "answerOptions": [
197
+ {
198
+ "isRight": true,
199
+ "describe": "Is a messaging backbone for building distributed applications?"
200
+ },
201
+ {
202
+ "isRight": true,
203
+ "describe": "Is a distributed commit log for communication between services"
204
+ },
205
+ {
206
+ "isRight": false,
207
+ "describe": "Is designed to move small volumes of ephemeral data"
208
+ },
209
+ {
210
+ "isRight": false,
211
+ "describe": "Is an add-on that creates a long term data store"
212
+ }
213
+ ]
214
+ },
215
+ {
216
+ "describe": "Universal Containers requires Service Representatives to update all Cases at least once every three days. To make sure this policy is obeyed, a developer has been asked to implement a field that displays the number of days since the last Case update.\nWhat should the developer use to configure the solution?",
217
+ "answerOptions": [
218
+ {
219
+ "isRight": false,
220
+ "describe": "Process Builder"
221
+ },
222
+ {
223
+ "isRight": false,
224
+ "describe": "Workflow rule"
225
+ },
226
+ {
227
+ "isRight": true,
228
+ "describe": "Formula field"
229
+ },
230
+ {
231
+ "isRight": false,
232
+ "describe": "Scheduled Apex Class"
233
+ }
234
+ ]
235
+ },
236
+ {
237
+ "describe": "A developer executes the following query in Apex to retrieve a list of contacts for each account:\nList<Account> accounts = [Select ID, Name, (Select ID, Name from Contacts) from Account];\nWhich two exceptions may occur when it executes?\nChoose 2 answers",
238
+ "answerOptions": [
239
+ {
240
+ "isRight": false,
241
+ "describe": "SOQL query limit exception due to the number of queries"
242
+ },
243
+ {
244
+ "isRight": true,
245
+ "describe": "SOQL query row limit exception due to the number of accounts"
246
+ },
247
+ {
248
+ "isRight": true,
249
+ "describe": "SOQL query row limit exception due to the number of contacts"
250
+ },
251
+ {
252
+ "isRight": false,
253
+ "describe": "CPU limit exception due to the complexity of the query"
254
+ }
255
+ ]
256
+ },
257
+ {
258
+ "describe": "A lead record that has a single related CampaignMember object is converted into a new account, contact, and opportunity.\nWhich object will the CampaignMember reference using a lookup field after conversion?",
259
+ "answerOptions": [
260
+ {
261
+ "isRight": false,
262
+ "describe": "The Product2"
263
+ },
264
+ {
265
+ "isRight": false,
266
+ "describe": "The Opportunity"
267
+ },
268
+ {
269
+ "isRight": true,
270
+ "describe": "The Contact"
271
+ },
272
+ {
273
+ "isRight": false,
274
+ "describe": "The Account"
275
+ }
276
+ ]
277
+ },
278
+ {
279
+ "describe": "Which two describe Heroku Redis?\nChoose 2 answers",
280
+ "answerOptions": [
281
+ {
282
+ "isRight": true,
283
+ "describe": "Is an in-memory key-value data store, run by Heroku."
284
+ },
285
+ {
286
+ "isRight": false,
287
+ "describe": "Is a repository for storing large images"
288
+ },
289
+ {
290
+ "isRight": false,
291
+ "describe": "Is an option for long term data storage"
292
+ },
293
+ {
294
+ "isRight": true,
295
+ "describe": "Is provisioned and managed as an add-on."
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ "describe": "What are two considerations for deciding to use a roll-up summary field?\nChoose 2 answers",
301
+ "answerOptions": [
302
+ {
303
+ "isRight": true,
304
+ "describe": "Roll-up summary can be performed on formula fields, but if their formula contains an #Error result, it may affect the summary value."
305
+ },
306
+ {
307
+ "isRight": true,
308
+ "describe": "Roll-up summary fields do not cause validation rules on the parent object unless that object is edited separately."
309
+ },
310
+ {
311
+ "isRight": false,
312
+ "describe": "Roll-up cannot be performed on formula fields that use cross-object references or on-the-fly calculations such as NOW()."
313
+ },
314
+ {
315
+ "isRight": false,
316
+ "describe": "Roll-up cannot be performed on formula fields."
317
+ }
318
+ ]
319
+ }
320
+ ]
321
+ }
@@ -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
+ }