-
Notifications
You must be signed in to change notification settings - Fork 7
/
Salesforce DEV-501 Flascards (MASTER SET).txt
6839 lines (4589 loc) · 252 KB
/
Salesforce DEV-501 Flascards (MASTER SET).txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
True or False?
Multilingual organizations can translate error messages using the Translation Workshop.
(#PLATFORM)`|`False.
Multilingual organizations can translate error messages using the Translation Workbench, not "Workshop".
If you have a multilingual organization, be sure to translate your error messages.
~|~
True or False?
Salesforce translates the standard and custom error messages for required lookup filters.
(#PLATFORM)`|`False.
Salesforce translates the standard error message for required lookup filters, but not custom error messages.
Use the Translation Workbench to translate lookup filter custom error messages.
To restore a standard error message after modifying it, click "Reset to default message".
~|~
How are Apex triggers stored?
(Select all that apply)
A. As static resources.
B. As metadata in the application, under the object with which they are associated.
C. As .trigger files in the /code directory of your organization's public files.
D. As compiled bytecode in the Salesforce platform Apex app server.
E. As resource files in the Developer Console.
F. None of these
(#APEX)`|`B. As metadata in the application, under the object with which they are associated.
Apex triggers are stored as metadata in the application under the object with which they are associated.
~|~
True or False?
HTML used in custom field validation error messages will be rendered by the Salesforce UI if the error message is displayed.
(#PLATFORM)`|`False.
For Apex saved using Salesforce.com API version 27.0 and later, the specified error message is escaped in the Salesforce user interface.
If the error message contains HTML markup, the escaped markup displays as text and isn't rendered in the user interface.
~|~
Apex is...
(select all that apply)
A: Strongly Typed.
B: Object Oriented.
C: Uses Java-like syntax.
D: Acts like database stored procedures.
(#APEX)`|`A: Strongly Typed.
B: Object Oriented.
C: Uses Java-like syntax.
D: Acts like database stored procedures.
~|~
Apex code can be initiated in what ways?
(select all that apply)
A: Web service requests.
B: Triggers on objects.
C: More?? Is "Button Clicks" a valid choice?
(#APEX)`|`A: Web service requests.
B: Triggers on objects.
C: More?? Is "Button Clicks" a valid choice?
~|~
Apex is available in which Salesforce Editions?
(select all that apply)
A. Professional Edition
B. Unlimited Edition
C. Enterprise Edition
D. Developer Edition
E. Database.com
F. None of these`|`A. Professional Edition
B. Unlimited Edition
C. Enterprise Edition
D. Developer Edition
E. Database.com
~|~
What are some best practices when setting up test data?
(Select all that apply)
A.
B. Create the necessary data in test classes, so the tests do not have to rely on data in a particular organization.
C.
D. Create all test data before calling the StartTest() method.
E.
F. None of these
(#APEX)
(#TESTS)`|`B. Create the necessary data in test classes, so the tests do not have to rely on data in a particular organization.
D. Create all test data before calling the StartTest() method.
Since tests don't commit, you won't need to delete any data.
~|~
The system method, ___________, lets you write test methods that change user contexts to either an existing user or a new user.
A. System.testAs()
B. System.testAsUser
C. System.runAsUser()
D. System.impersonateUser()
E. System.runAs()
F. None of these
(#APEX)
(#TESTS)`|`E. System.runAs()
Generally, all Apex code runs in system mode, and the permissions and record sharing of the current user are not taken into account.
The system method, System.runAs(), lets you write test methods that change user contexts to either an existing user or a new user.
~|~
True or False?
System.runAs() does not validate CRUD or Field Level Security permissions.
(#APEX)
(#TESTS)`|`True.
The System.runAs() functionality can be used to test and verify proper data sharing and data access.
However, System.runAs() does NOT validate CRUD or Field Level Security permissions.
~|~
True or False?
Complex data types in Apex (eg. Objects, sObjects, and Lists) are initialized to NULL, while Primitive types (eg. Integer, Boolean, and Decimal) are initialized to zero.
(#APEX)`|`False.
All Apex variables are initialized to NULL. This includes static variables and function parameters.
~|~
True or False?
In Apex, Boolean variables which are NULL evaluate to FALSE.
(#APEX)`|`False.
You'll get a null reference exeception.
Always compare booleans to TRUE, instead of false. A null will not evaluate to true, even thought it also won't be equal to FALSE.
~|~
True or False?
When using multiple catch() statements in a try-catch block, the general exception type, 'Exception', can only be used by the last catch() statement.
(#APEX)`|`True.
A developer can use optional catch statements for any exception type in a try-catch block. However, the general exception type, 'Exception', must only be used by the last catch() block.
EXAMPLE:
try{
// Some risky code.
}
catch(SomeExceptionType e){
// Handle one exception type.
}
catch(SomeOtherExceptionType e){
// Handle another exception type.
}
catch(Exception e){
// This must be the last catch block.
}
~|~
Good Apex tests should....
(Select all that apply)
A. Make calls to methods using both valid and invalid inputs.
B. In the case of conditional logic (including ternary operators), execute each branch of code logic.
C. Only test code using the System Administrator profile.
D. Focus solely on test coverage percentage score.
E. Complete successfully without throwing any exceptions, unless those errors are expected and caught in a try...catch block.
F. None of these
(#APEX)`|`Good Apex tests should:
A. Make calls to methods using both valid and invalid inputs.
B. In the case of conditional logic (including ternary operators), execute each branch of code logic.
E. Complete successfully without throwing any exceptions, unless those errors are expected and caught in a try...catch block.
~|~
Good Apex tests should....
(Select all that apply)
A. Exercise bulk trigger functionality—use at least 20 records in your tests.
B. Only test code using the Standard User profile.
C. Access live organization data to validate SOQL queries and DML operations.
D. Use the isTest annotation. Classes defined with the isTest annotation do not count against your organization limit of 3 MB for all Apex code. See IsTest Annotation.
E. Use the runAs method to test your application in different user contexts.
F. None of these
(#VISUALFORCE)
(#APEX)
(#PLATFORM)`|`Good Apex tests should:
A. Exercise bulk trigger functionality—use at least 20 records in your tests.
D. Use the isTest annotation. Classes defined with the isTest annotation do not count against your organization limit of 3 MB for all Apex code. See IsTest Annotation.
E. Use the runAs method to test your application in different user contexts.
~|~
Good Apex tests should....
(Select all that apply)
A. Use the ORDER BY keywords to ensure that the records are returned in the expected order.
B. Write comments stating not only what is supposed to be tested, but the assumptions the tester made about the data, the expected outcome, and so on.
C. Avoid using System.Assert methods to reduce problems when deploying to a production org.
D. Focus on single-object design patterns to keep test classes clean, lightweight, and fast.
E. Test the classes in your application individually. Never test your entire application in a single test.
F. None of these
(#APEX)`|`Good Apex tests should:
A. Use the ORDER BY keywords to ensure that the records are returned in the expected order.
B. Write comments stating not only what is supposed to be tested, but the assumptions the tester made about the data, the expected outcome, and so on.
E. Test the classes in your application individually. Never test your entire application in a single test.
~|~
Good Apex tests should....
(select all that apply)
A. Use test methods that are defined inside of the Apex class that they are testing.
B. Always handle all exceptions that are caught, instead of merely catching the exceptions.
C. Avoid using System.Debug(), and focus only on System.Assert methods to alert developers of problems.
D. Use System.assert methods to prove that code behaves properly.
E. Have names that always start with "TEST_CLASS_", and end with "__c".
F. None of these
(#APEX)`|`Good Apex tests should:
B. Always handle all exceptions that are caught, instead of merely catching the exceptions.
D. Use System.assert methods to prove that code behaves properly.
~|~
True or False?
When deploying to a production organization, 75% of the unit tests in your organization namespace are executed.
(#APEX)
(#TESTS)`|`False.
When deploying to a production organization, EVERY unit test in your organization namespace is executed.
In order to deploy, your unit tests must provide 75% code coverage for all the Apex classes in your organization.
~|~
True or False?
Calls to System.debug are not counted as part of Apex code coverage.
(#APEX)
(#TESTS)`|`True.
Calls to System.debug are not counted as part of Apex code coverage.
~|~
True or False?
Test methods and test classes are counted as part of Apex code coverage, and must be covered.
(#APEX)
(#TESTS)`|`False.
Test methods and test classes are not counted as part of Apex code coverage, and do not need to be covered.
~|~
True or False?
Every trigger must have some test coverage.
(#APEX)
(#TESTS)`|`True.
Every trigger must have some test coverage.
~|~
Although Trigger.new is a collection of records, when used as a bind variable in a SOQL query, Apex automatically....
(Select all that apply)
A. Passes the collection to the query, as long as the calling class implements the Trigger.QueryBind class.
B. Transforms the list of records into a list of corresponding Ids.
C. Truncates the collection so that only the Id and Name fields.
D. Throws a DMLException with the ILLEGAL_QUERY status.
E. Transforms the SOQL to an in-place SOSL query and returns the FIND results.
F. None of these
(#APEX)`|`B. Transforms the list of records into a list of corresponding Ids.
Although Trigger.new is a collection of records, when used as a bind variable in a SOQL query, Apex automatically transforms the list of records into a list of corresponding Ids.
Contact[] cons = [SELECT LastName FROM Contact
WHERE AccountId IN :Trigger.new];
~|~
A ___________________ is a set of instructions that specify what happens when a user interacts with the components specified in associated Visualforce markup, such as when a user clicks a button or link.
(#APEX)
(#VISUALFORCE)`|`Visualforce controller
A Visualforce controller is a set of instructions that specify what happens when a user interacts with the components specified in associated Visualforce markup, such as when a user clicks a button or link.
Controllers also provide access to the data that should be displayed in a page, and can modify component behavior.
~|~
True or False?
A cascade-delete operation respects the security and sharing settings of all objects and records being deleted.
(#PLATFORM)`|`False.
When creating lookup relationships, selecting the "Delete this record also" option can result in a cascade-delete when the target lookup record is deleted.
A cascade-delete bypasses security and sharing settings, which means users can delete records when the target lookup record is deleted even if they don't have access to the records.
To prevent records from being accidentally deleted, cascade-delete is disabled by default. Contact Salesforce.com to get the cascade-delete option enabled for your organization.
~|~
____________ is a placeholder for content that is rendered in a specific part of the parent component, such as the header or footer of an <apex:dataTable>.
(Select all that apply)
A. <apex:labelSet>
B. <apex:customName>
C. <c:facet>
D. <apex:facet>
E. <c:labelSet>
F. None of these
(#VISUALFORCE)`|`D. <apex:facet>
Defines a placeholder for content that is rendered in a specific part of the parent component, such as the header or footer of an <apex:dataTable>.
An <apex:facet> component can only exist in the body of a parent component if the parent supports facets.
The name of the facet component must match one of the pre-defined facet names on the parent component. This name determines where the content of the facet component is rendered.
Consequently, the order in which a facet component is defined within the body of a parent component does not affect the appearance of the parent component.
~|~
Standard List Controller Actions.
save
(select all that apply)
A.
B. Inserts new records or updates existing records that have been changed.
C.
D.
E. Returns the user to the original page (if known), or the home page, after execution.
F. None of these
(#APEX)
(#VISUALFORCE)`|`B. Inserts new records or updates existing records that have been changed.
E. Returns the user to the original page (if known), or the home page, after execution.
~|~
Standard List Controller Actions.
quicksave
(select all that apply)
A. Inserts new records or updates existing records that have been changed.
B.
C. Does not redirect the user to another page.
D.
E.
F. None of these
(#APEX)
(#VISUALFORCE)`|`A. Inserts new records or updates existing records that have been changed.
C. Does not redirect the user to another page.
~|~
Standard List Controller Actions.
list
(select all that apply)
A.
B.
C. Returns a PageReference object of the standard list page.
D. Bases the return value on the most recently used list filter when the filterID is not specified by the user.
E.
F. None of these
(#APEX)
(#VISUALFORCE)`|`C. Returns a PageReference object of the standard list page.
D. Bases the return value on the most recently used list filter when the filterID is not specified by the user.
#EXPLAIN#
~|~
Standard List Controller Actions.
cancel
(select all that apply)
A.
B. Returns the user to the page where the user originally invoked an edit operation.
C.
D.
E. Aborts an edit operation.
F. None of these
(#VISUALFORCE)`|`B. Returns the user to the page where the user originally invoked an edit operation.
E. Aborts an edit operation.
#EXPLAIN#
~|~
Standard List Controller Actions.
first
(select all that apply)
A.
B. Displays the first page of records in the set.
C.
D.
E.
F. None of these
(#VISUALFORCE)`|`B. Displays the first page of records in the set.
#EXPLAIN#
~|~
Standard List Controller Actions.
last
(select all that apply)
A.
B.
C.
D.
E. Displays the last page of records in the set.
F. None of these
(#VISUALFORCE)`|`E. Displays the last page of records in the set.
~|~
Standard List Controller Actions.
next
(select all that apply)
A.
B.
C. Displays the next page of records in the set.
D.
E.
F. None of these
(#VISUALFORCE)`|`C. Displays the next page of records in the set.
~|~
Standard List Controller Actions.
previous
(select all that apply)
A. Displays the previous page of records in the set.
B.
C.
D.
E.
F. None of these
(#VISUALFORCE)`|`A. Displays the previous page of records in the set.
~|~
What is the difference between <apex:selectOption> and <apex:selectOptions>?`|`What is the difference between <apex:selectOption> and <apex:selectOptions>?
~|~
True or False?
In a custom controller or controller extension, you can refer to or instantiate a PageReference object in the following way: Page.existingPageName
(#VISUALFORCE)
(#APEX)`|`True.
In a custom controller or controller extension, you can refer to or instantiate a PageReference in one of the following ways:
Page.existingPageName
Refers to a PageReference for a Visualforce page that has already been saved in your organization.
By referring to a page in this way, the platform recognizes that this controller or controller extension is dependent on the existence of the specified page and will prevent the page from being deleted while the controller or extension exists.
~|~
True or False?
<apex:commandButton> components can be placed anywhere on a Visualforce page as long as they are children of the <apex:page> tag.
(#VISUALFORCE)`|`False.
It is true that <apex:commandButton> components must be children of the <apex:page> tag.
However, <apex:commandButton> components must ALSO be placed between <apex:form></apex:form> tags.
~|~
True or False?
Splitting up application development tools based on whether they affect the data model, business logic, or user interface is also known as the Model-View-Controller (MVC) application development pattern.
(#PLATFORM)`|`True.
In Salesforce:
- The Model is the data model (Standard and Custom objects)
- The View is the user interface (Visualforce Pages and Components)
- The Controller is the business logic (Apex code)
~|~
True or False?
S-controls, the tool that allows application developers to display custom HTML in a detail page or custom tab, provide more flexibility than page layouts, and are the preferred way to create custom user interface elements in Salesforce.
(#PLATFORM)`|`False.
S-controls have been superseded by Visualforce pages. After March 2010 organizations that have never created s-controls, as well as new organizations, won't be allowed to create them. Existing s-controls will remain unaffected, and can still be edited.
~|~
A Visualforce page consists of which primary elements?
(Select all that apply)
A. An Apex class
B. A Visualforce controller
C. A trigger.
D. S-Controls
E. Visualforce Markup
F. None of the above
(#VISUALFORCE)`|`B. A Visualforce controller
E. Visualforce Markup
Developers can use Visualforce to create a Visualforce page definition. A page definition consists of two primary elements:
• Visualforce markup
• A Visualforce controller
~|~
Visualforce markup consists of...
(Select all that apply)
A. Any Web-enabled code
B. Visualforce Tags
C. Apex code
D. HTML
E. JavaScript
F. C# Remoting Modules
G. None of the above
(#VISUALFORCE)`|`A. Any Web-enabled code
B. Visualforce Tags
D. HTML
E. JavaScript
Visualforce markup consists of Visualforce tags, HTML, JavaScript, or any other Web-enabled code embedded within a single
<apex:page> tag.
The markup defines the user interface components that should be included on the page, and the way they
should appear.
~|~
True or False?
Visualforce markup defines the user interface components that should be included on the page, and the way they
should appear.
(#VISUALFORCE)`|`True.
Visualforce markup consists of Visualforce tags, HTML, JavaScript, or any other Web-enabled code embedded within a single
<apex:page> tag.
The markup defines the user interface components that should be included on the page, and the way they
should appear.
~|~
What provides access to data that should be displayed in a Visualforce page, and can modify Visualforce component behavior?
(Select all that apply)
A. Validation rules
B. Apex controller
C. MVC controller class
D. Visualforce controller
E. Force.com IDE
F. None of the above
(#VISUALFORCE)`|`D. Visualforce controller
A Visualforce controller is a set of instructions that specify what happens when a user interacts with the components specified
in associated Visualforce markup, such as when a user clicks a button or link.
Controllers also provide access to the data that should be displayed in a page, and can modify component behavior.
~|~
True or False?
A developer can use the standard controllers provided by the Force.com platform and custom controller logic simultaneously by passing the name of their custom controller class to the "controller" attribute of the <apex:page> tag.
(#VISUALFORCE)`|`False.
Standard and custom controllers can not be used simultaneously.
A developer can either use a standard controller provided by the Force.com platform, or add custom controller logic with a
class written in Apex.
To leverage functionality of Standard Controllers, while simultaneously adding custom logic, you must write a custom class that extends the standard controller. You notify the Visualforce page of your customizations via the "extensions" attribute of the <apex:page> tag.
~|~
True or False?
A standard controller consists of the same functionality and logic that is used by the Salesforce pages used by standard objects, like Accounts and Contacts.
A custom controller provides the same functionality for user-defined, Custom objects.
(#VISUALFORCE)`|`False.
A standard controller consists of the same functionality and logic that is used for a standard Salesforce page, regardless of whether the object is a Standard Salesforce object or a Custom object.
For example, if you use the standard Accounts controller, clicking a Save button in a Visualforce page results in the same behavior as clicking Save on a standard Account edit page. The same behavior holds true for Custom objects.
~|~
True or False?
If you use a standard controller on a page and the user doesn't have access to the object, the page will display a insufficient
privileges error message.
(#VISUALFORCE)`|`True.
If you use a standard controller on a page and the user doesn't have access to the object, the page will display a insufficient privileges error message.
You can avoid this by checking the user's accessibility for an object and displaying components appropriately.
~|~
__________ enables you to create Visualforce pages that can display or act on a set of records.
A. A Standard Controller
B. A Standard List Controller
C. An Apex Recordset
D. A Custom List Doctype
E. An Apex class
F. None of the above
(#VISUALFORCE)`|`B. A Standard List Controller
A standard list controller enables you to create Visualforce pages that can display or act on a set of records.
Examples of existing Salesforce pages that work with a set of records include list pages, related lists, and mass action pages.
~|~
A ____________ is a class written in Apex that implements all of a page's logic, without leveraging a standard controller.
A. Controller Extension
B. Validation Extension
C. Visualforce Component
D. Visualforce Plugin
E. Custom Controller
F. None of the above
(#VISUALFORCE)`|`E. Custom Controller
A custom controller is a class written in Apex that implements all of a page's logic, without leveraging a standard controller.
If you use a custom controller, you can define new navigation elements or behaviors, but you must also reimplement any functionality that was already provided in a standard controller.
Like other Apex classes, custom controllers execute entirely in system mode, in which the object and field-level permissions of the current user are ignored. You can specify whether a user can execute methods in a custom controller based on the user's profile.
~|~
Like other Apex classes, custom controllers execute entirely in ____________, in which the object and field-level permissions of the current user are ignored.
A. User Mode
B. System Mode
C. OWD Mode
D. With-Sharing Mode
E. Anonymous Mode
F. None of the above
(#VISUALFORCE)`|`B. System Mode
Like other Apex classes, custom controllers execute entirely in system mode, in which the object and field-level permissions of the current user are ignored.
You can specify whether a user can execute methods in a custom controller based on the user's profile.
~|~
If you use a standard controller on a page and the user doesn't have access to the object, the page will...
(Select all that apply)
A. Throw an ACCESS_VIOLATION exception.
B. Write an ACCESS_VIOLATION message to the debug log.
C. Display an insufficient privileges error message.
D. Redirect the user to their home page.
E. Ask the user if they would like to upgrade permissions in order to view the object.
F. None of the above
(#VISUALFORCE)`|`C. Display an insufficient privileges error message.
If you use a standard controller on a page and the user doesn't have access to the object, the page will display a insufficient privileges error message. You can avoid this by checking the user's accessibility for an object and displaying components appropriately.
A standard controller consists of the same functionality and logic that is used for a standard Salesforce page. For example, if you use the standard Accounts controller, clicking a Save button in a Visualforce page results in the same behavior as clicking Save on a standard Account edit page.
~|~
By using the ____________ keyword in a class definition, a developer can create a custom controller or controller extension that respects OWD, role hierarchy, and sharing rules.
(Select all that apply)
A. with permissions
B. with defaults
C. with security
D. with sharing
E. with roles
F. None of these
(#VISUALFORCE)
(#APEX)`|`D. with sharing
Although custom controllers and controller extension classes execute in system mode and thereby ignore user permissions and field-level security, you can choose whether they respect a user's organization-wide defaults, role hierarchy, and sharing rules by using the "with sharing" keywords in the class definition.
~|~
A/an _____________ is a class written in Apex that adds to or overrides behavior in a standard or custom controller.
(Select all that apply)
A. Custom component
B. Controller extension
C. Apex extension
D. Extended Controller
E. Component extension
F. None of these
(#VISUALFORCE)
(#APEX)`|`B. Controller extension
A controller extension is a class written in Apex that adds to or overrides behavior in a standard or custom controller.
Extensions allow you to leverage the functionality of another controller while adding your own custom logic. Because standard controllers execute in user mode, in which the permissions, field-level security, and sharing rules of the current user are enforced, extending a standard controller allows you to build a Visualforce page that respects user permissions.
Although the extension class executes in system mode, the standard controller executes in user mode. As with custom controllers, you can specify whether a user can execute methods in a controller extension based on the user's profile.
~|~
Developers can use Visualforce pages to:
(Select all that apply)
A. Override standard buttons
B. Override tab overview pages
C. Define custom tabs
D. Embed components in detail page layouts
E. Create dashboard components or custom help pages
F. Create custom Console components.
G. None of these
(#VISUALFORCE)`|`A. Override standard buttons
B. Override tab overview pages
C. Define custom tabs
D. Embed components in detail page layouts
E. Create dashboard components or custom help pages
F. Create custom Console components.
Developers can use Visualforce pages to:
• Override standard buttons, such as the New button for accounts, or the Save button for contacts
• Override tab overview pages, such as the Accounts tab home page
• Define custom tabs
• Embed components in detail page layouts
• Create dashboard components or custom help pages
• Customize, extend, or integrate the sidebars in the Service Cloud console (custom console components)
~|~
Which permissions are required to set Visualforce page security?
(Select all that apply)
A.
B. Customize Application
C.
D.
E. Manage Users
F. None of these
(#PLATFORM)`|`B. Customize Application
E. Manage Users
Required permissions for various Visualforce development tasks:
◊ To enable Visualforce development mode: "Customize Application"
◊ To create, edit, or delete Visualforce pages: "Customize Application"
◊ To create and edit custom Visualforce components: "Customize Application"
◊ To edit custom Visualforce controllers or Apex "Author Apex"
◊ To set Visualforce page security: "Customize Application" AND "Manage Users"
◊ To set version settings for Visualforce pages: "Customize Application"
◊ To create, edit, or delete static resources: "Customize Application"
◊ To create Visualforce Tabs: "Customize Application"
~|~
The Benefits of Visualforce
• User-friendly development
• Integration with other Web-based user interface technologies
• Model-View-Controller (MVC) style development
• Concise syntax
• Data-driven defaults
• Hosted platform
• Automatically upgradeable`|`The Benefits of Visualforce
• User-friendly development
• Integration with other Web-based user interface technologies
• Model-View-Controller (MVC) style development
• Concise syntax
• Data-driven defaults
• Hosted platform
• Automatically upgradeable
~|~
When to use Visualforce
• Build wizards and other multistep processes.
• Create your own custom flow control through an application.
• Define navigation patterns and data-specific rules for optimal, efficient application interaction.`|`When to use Visualforce
• Build wizards and other multistep processes.
• Create your own custom flow control through an application.
• Define navigation patterns and data-specific rules for optimal, efficient application interaction.
~|~
When to use Apex
• Create Web services.
• Create email services.
• Perform complex validation over multiple objects.
• Create complex business processes that are not supported by workflow.
• Create custom transactional logic (logic that occurs over the entire transaction, not just with a single record or object.)
• Attach custom logic to another operation, such as saving a record, so that it occurs whenever the operation is executed, regardless of whether it originates in the user interface, a Visualforce page, or from SOAP API.`|`When to use Apex
• Create Web services.
• Create email services.
• Perform complex validation over multiple objects.
• Create complex business processes that are not supported by workflow.
• Create custom transactional logic (logic that occurs over the entire transaction, not just with a single record or object.)
• Attach custom logic to another operation, such as saving a record, so that it occurs whenever the operation is executed, regardless of whether it originates in the user interface, a Visualforce page, or from SOAP API.
~|~
Under what circumstances is it appropriate for a developer to add functionality to their application via the SOAP API?
(Select all that apply)
A. When consumers of the desired functionality have no experience with Force.com development.
B. When the desired functionality processes only one type of record at a time.
C. When the organization chooses not to share its Enterprise WSDL.
D. When the desired functionality does not require any transactional control.
E. None of these
(#APEX)
(#PLATFORM)`|`B. When the desired functionality processes only one type of record at a time.
D. When the desired functionality does not require any transactional control.
Use standard SOAP API calls if you want to add functionality to a composite application that processes only one type of record at a time and does not require any transactional control (such as setting a Savepoint or rolling back changes).
~|~
To aid ___________, each Visualforce page and custom component is saved with version settings for the specified version of the API as well as the specific version of Visualforce.
A. bytecode compiles
B. Apex testing
C. portal development
D. backwards-compatibility
E. exception handling
F. None of these
(#VISUALFORCE)`|`D. backwards-compatibility
To aid backwards-compatibility, each Visualforce page and custom component is saved with version settings for the specified version of the API as well as the specific version of Visualforce.
If the Visualforce page or component references installed managed packages, the version settings for each managed package referenced by the page or component is saved too.
~|~
True or False?
Custom components that are referenced in Visualforce pages always perform under their own version number.
(#VISUALFORCE)
(#PLATFORM)`|`True.
Custom components that are referenced in Visualforce pages always perform under their own version number.
Thus, if a custom component is set at version 15.0, it always exhibits behavior from Visualforce version 15.0, whether running in a version 15.0 or a 16.0 page.
~|~
True or False?
You can only access custom Visualforce component version settings if you edit the component using Developer Mode.
(#VISUALFORCE)
(#PLATFORM)`|`False.
You can't access version settings if you edit using Developer Mode.
You can only access the version settings for a page or custom component if you edit it from Your Name > Setup > Develop.
~|~
One of the best ways to build Visualforce pages and code is by enabling ___________.
A. Visualforce development mode
B. Apex development mode
C. Force.com IDE access
D. Show viewstate
E. Visualforce system mode
F. None of these
(#VISUALFORCE)
(#PLATFORM)`|`A. Visualforce development mode
The best way to build Visualforce is by enabling Visualforce development mode.
Visualforce development mode is only available for users with the "Customize Application" permission.
Development mode provides you with:
◊ A special development footer on every Visualforce page that includes the page's view state, any associated controller, a link to the component reference documentation, and a page markup editor that offers highlighting, find-replace functionality, and auto-suggest for component tag and attribute names.
◊ The ability to define new Visualforce pages just by entering a unique URL.
◊ Error messages that include more detailed stack traces than what standard users receive.
~|~
True or False?
Visualforce development mode provides you with error messages that include more detailed stack traces than what standard users receive.
(#VISUALFORCE)
(#PLATFORM)`|`True.
The best way to build Visualforce is by enabling Visualforce development mode.
Visualforce development mode is only available for users with the "Customize Application" permission.
Development mode provides you with:
◊ A special development footer on every Visualforce page that includes the page's view state, any associated controller, a link to the component reference documentation, and a page markup editor that offers highlighting, find-replace functionality, and auto-suggest for component tag and attribute names.
◊ The ability to define new Visualforce pages just by entering a unique URL.
◊ Error messages that include more detailed stack traces than what standard users receive.
~|~
The __________ of a Visualforce page is composed of all the data that's necessary to maintain the state of the controller during server requests (like sending or receiving data).
A. Page Memory
B. State Settings
C. Cookie Collection
D. View State
E. Page Header
F. None of these
(#VISUALFORCE)
(#APEX)`|`D. View State
The view state of a web page is composed of all the data that's necessary to maintain the state of the controller during server requests (like sending or receiving data).
Since the view state contributes to the overall size of your page, performance of a page can depend on efficiently managing the view state.
The View State tab in the development mode footer provides information about the view state of your Visualforce page as it interacts with Salesforce.
~|~
True or False?
The View State tab always appears in the Visualforce "development mode" editor, as long as the "Enable View State" setting is checked in the user's personal settings.
(#VISUALFORCE)
(#APEX)
(#PLATFORM)`|`False.
It is true that without selecting the view state tab would not appear if "Enable View State" setting in the user's personal settings.
However, even with view state enabled, because the view state is linked to form data, the View State tab ONLY appears if your page contains an <apex:form> tag.
In addition, the View State tab displays only on pages using custom controllers or controller extensions.
~|~
True or False?
Visualforce pages and components created using Salesforce API version 19.0 or higher must be written as well-formed XML.