Q&A1 Flashcards

1
Q

Which component can be bound to the custom controller property statusMessage? public boolean statusMessage{get; private set;}

  1. -apex:outputText value=”{!statusMessage}”/-
  2. -apex:inputText value=”{!statusMessage}”/-
  3. -apex:inputCheckbox value=”{!statusMessage}”/-
  4. Only explicit getter and setter methods can be used for value binding.
A
  1. -apex:outputText value=”{!statusMessage}”/-
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A developer wants to present a custom message on a VF page, using the standard look and feel. Which component should he use?

  1. -apex:pageMessage-
  2. -apex:customMessage-
  3. -apex:message-
  4. -apex:message-
A
  1. -apex:pageMessage-
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which is not a name of a method available on the standardController class?

  1. save
  2. view
  3. new
  4. edit
A
  1. new
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the correct markup language for using a custom controller named CustomController in a page displayed under the Account tab?

  1. -apex:page controller=”CustomController” tab=”Account”/-
  2. -apex:page controller=”CustomController” tabStyle=”Account”/-
A
  1. -apex:page controller=”CustomController” tabStyle=”Account”/-
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can a developer test an email service and the classes it references?

  1. Create Messaging.IndboundEmail and Messaging.IndboundEventlope objects and pass the to the handleIndboundEmail() method of the Messaging.InboundEmailHandler class.
  2. Create a Messaging.OutboundEmail object, pass it to Messaging.sendEmail(), and then call the handleInboundEmail() method of the Messaging.InboundEmailHandler class.
A
  1. Create Messaging.IndboundEmail and Messaging.IndboundEventlope objects and pass the to the handleIndboundEmail() method of the Messaging.InboundEmailHandler class.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which triggers are invoked when two contacts are merged?

  1. no triggers
  2. only delete and update contact triggers
  3. only delete and update triggers on the parent account
  4. delete and update contact triggers and triggers on the parent account
A
  1. only delete and update contact triggers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which standard VF component can be used to add the ability to invoke a controller action method from the onClick event of an component.

  1. -apex:actionSupport-
  2. -apex:actionMethod-
  3. -apex:actionRegion-
  4. -apex:actionPoller-
A
  1. -apex:actionSupport-
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A custom component named myComponent (no attributes) was created in an Org.
Which piece of code should be used to incorporate the component into a page in the same Org.
1. -custom:myComponent/-
2. -c:myComponent/-
3. -myComponent/-
4. -apex:myComponent/-

A
  1. -c:myComponent/-
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which is the capability of the developer console?
(3 answers)
1. Edit apex classes in production
2. View feedback on usage against governor limits
3. View a stack trace
4. Generate Apex code from WSDL
5. Execute anonymous blocks

A
  1. View feedback on usage against governor limits
  2. View a stack trace
  3. Execute anonymous blocks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

True/False: Code executed in managed packages applies to an organisation’s governor limits?

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which combination of tags is used when working with VF templates?

  1. Use apex:insert in the Visualforce template; use apex:define in the Visualforce page referring to the template.
  2. Use apex:define in the Visualforce template; use apex:insert in the Visualforce page referring to the template.
A
  1. Use apex:define in the Visualforce template; use apex:insert in the Visualforce page referring to the template.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the correct sequence of operations for an initial request to a page?

  1. Controller constructor, page’s action method invoked, getter methods called.
  2. Controller constructor, getter methods called, page’s action method invoked.
A
  1. Controller constructor, page’s action method invoked, getter methods called.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

True/False: A VF email template can be used when sending mass email.

A

False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

True/False: The following line successfully instantiates a standard controller.
ApexPages.StandardController con =
new ApexPages.StandardController();

A

False.

Note, Standard Controllers must have a standard object as parameter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

True/False: Custom Components must be wrapped inside tags.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What type of map is returned by the Schema getGlobalDescribe method?

  1. a map of sObject names and sObject and DescribesObjectResults accessible by running user.
  2. a map of sObject names and sObject tokens within organization.
  3. a map of sObject names and DescribesObjectResults within organization
  4. a map of sObject names and sObject tokens accessible by running user.
A
  1. a map of sObject names and sObject tokens within organization.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How to create and display an error message on a VF page that has the line -apex:pageMessages/-

  1. Instantiate and throw a custom exception that extends System.Exception class with error message passed as argument to exception constructor.
  2. Custom Error message can only be shown by -page:pageMassage- component.
  3. Instantiate ApexPages.Message object with severity and error message and pass this object as argument to ApexPages.addMessage() method.
  4. Include error message as value as -apex:addMessage- component nested inside the -apex:messages/- tags.
A
  1. Instantiate ApexPages.Message object with severity and error message and pass this object as argument to ApexPages.addMessage() method.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

True/False: Real time webservice integration cannot be included directly in an Apex trigger.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What page definition makes a page viable for overriding that standard edit button of a custom object named my_object__c. (choose 2 answers)

  1. -apex:page standardController=”my_object__c”-
  2. -apex:page standardController=”my_object__c” recordSetVar=”records”-
  3. -apex:page controller=”my_object__c”-
  4. -apex:page standardController=”my_object__c” extensions=”myObjectExtension”-
A
  1. -apex:page standardController=”my_object__c”-

4. -apex:page standardController=”my_object__c” extensions=”myObjectExtension”-

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What statement is true about VF Email Templates? (choose 2 answers)

  1. All email template tags must be wrapped inside a single emailTemplate component tag.
  2. A VF email template can be used when sending mass email.
  3. The email template must contain an htmlEmailBody tag and/or plainTextEmailBody tag.
  4. The detail and form components are permitted as child nodes of emailTemplate.
A
  1. All email template tags must be wrapped inside a single emailTemplate component tag.
  2. The email template must contain an htmlEmailBody tag and/or plainTextEmailBody tag.
21
Q

Find the matching definition for the tags used to create a VF template:
1. -apex:Insert-
2. -apex:Define-
3. -apex:Template-
4. -apex:Composition-
Matches (one has no match):
A. Provides content to be inserted into template.
B. Declares a named area in the template.
C. Area of the page to include content from template

A

1 -> C. Area of the page to include content from template

  1. -> A. Provides content to be inserted into template.
  2. -> None
  3. -> B. Declares a named area in the template.
22
Q

Which statement is true regarding Apex? (choose 2 answers)

  1. Methods with @future annotation can take sObjects as argument.
  2. No more that 50 @future method calls are allowed per Apex invocation.
  3. The asynchronous method must specify callout=true to do callouts.
  4. The @future annotated methods can be called from another @future method.
A
  1. No more that 50 @future method calls are allowed per Apex invocation.
  2. The asynchronous method must specify callout=true to do callouts.
23
Q

When is the View state of a VF page using only a standard controller deleted?

  1. After the user is redirected to another page.
  2. After the resulting HTML is sent to the user’s browser.
  3. After the controller objects for the page are instantiated.
  4. After the deletion of the page by administrator or developer.
A
  1. After the resulting HTML is sent to the user’s browser.
24
Q

When would a developer use after triggers?

  1. To access field values after workflow rules are executed.
  2. To access field values that set by the DB.
  3. To access field values before validation rules process.
  4. To access field values after data is committed to the DB.
A
  1. To access field values that set by the DB.
25
Q

True/False: Static resources support larger files that documents.

A

False.

26
Q

True/False: Static resources can be cached; documents can not.

A

True.

27
Q

To test an email service the developer must create which objects to be passed to the handleIndboundEmail() method. (choose 2 answers)

  1. Messaging.OutboundEmail
  2. Messaging.InboundEmail
  3. Messaging.InboundEnvelope
A
  1. Messaging.InboundEmail

3. Messaging.InboundEnvelope

28
Q

Which statement is false about the usage of Apex describe?

  1. Describe results are serializeable and validated at compile time.
  2. The DescribeSobjectResult contains all the describe properties for the corresponding sObject.
  3. On the describe result, the getSobjectField method returns the tokens for the field.
  4. Both sObject tokens and field tokens have the method getDescribe.
A
  1. Describe results are serializeable and validated at compile time.
29
Q

Which standard VF component can be used to add the ability to invoke a controller action from the onClick event of an -apex:outputText- component?

  1. -apex:actionSupport-
  2. -apex:actionPoller-
  3. -apex:actionMethod-
  4. -apex:actionRegion-
A
  1. -apex:actionSupport-
30
Q

Which statement is true regarding running apex asynchronously?

  1. You can specify callout=false to prevent a method from making callouts.
  2. The @future annotation must be used to make a web service callout from a trigger.
  3. The class must be defined with @future annotation.
  4. Methods with the @future annotation must be static methods and can only return a void type.
A
  1. Methods with the @future annotation must be static methods and can only return a void type.
31
Q

True/False: When the accounts where deleted, associated contacts where not deleted; hence, when undeleting the records, only the account after undelete trigger fires.

A

False.

32
Q

True/False: When the accounts where deleted, associated contacts where alse deleted; when undeleting the records, both accounts and contacts where recovered, and both the account and contact after undelete trigger fires.

A

False.

33
Q

True/False: When the accounts where deleted, associated contacts where also deleted; when undeleting the records, both accounts and contacts where recovered, and only the account after undelete trigger fires.

A

True.

34
Q

True/False: When the accounts where deleted, associated contacts where also deleted; however, when undeleting the records, anly the accounts where recovered, and only the account after undelete trigger fires.

A

False.

35
Q

Which interface must a class used with an Apex email service implement?

  1. Messaging.InboundEmailHandler
  2. Apex.InboundEmailHandler
  3. Apex.EmailServiceHandler
  4. Messaging.EmailServiceHandler
A
  1. Messaging.InboundEmailHandler
36
Q

Which combination of tags is used when working with VF templates?

  1. -apex:insert- in the VF template; -apex:define- in the VF page referring to the template.
  2. -apex:define- in the VF template; -apex:insert- in the VF page referring to the template.
  3. -apex:define- in the VF template; -apex:composition- in the VF page referring to the template.
  4. -apex:composition- in the VF template; -apex:define- in the VF page referring to the template.
A
  1. -apex:insert- in the VF template; -apex:define- in the VF page referring to the template.
37
Q

What is a method for reducing the view state size of a VF page? (choose 2 answers)

  1. Use the transient keyword to declare instance variables.
  2. Use JavaScript remoting calls to the controller.
  3. Use the this keyword when initializing instance variables.
  4. Declare instance variables as private.
A
  1. Use the transient keyword to declare instance variables.

4. Declare instance variables as private.

38
Q

Which statement is true about Apex? (choose 2 answers)

  1. Apex code can be written in any text editor
  2. Apex code can be execute on a client
  3. Apex code can reference Java libraries
  4. Apex code can only be executed on the Force.com platform
A
  1. Apex code can be written in any text editor

4. Apex code can only be executed on the Force.com platform

39
Q

What is the purpose of the executed script statements governor limit:

  1. To prevent triggers from invoking other triggers.
  2. To prevent recursion in class methods.
  3. To prevent infinite script loops.
  4. To prevent DML statements from exceeding 100.
A
  1. To prevent infinite script loops.
40
Q
True/False: The lines below compiles:
@isTest
public class MyTest{
public static testMethod void myTestMethod(){
} }
A

True.

41
Q

An Apex script called by execute Anonymous makes changes to the DB, but fails during execution. What happens?

  1. Changes that are already made are comitted.
  2. The system administrator is notified to roll back the changes.
  3. Database changes are not allowed through anonymous blocks.
  4. Force.com automatically rolls back any changes made to the DB.
A
  1. Force.com automatically rolls back any changes made to the DB.
42
Q

Map the description to the method:
1. getGlobalDescribe()
2. describeDataCategoryGroups(sObjectNames)
3. describeSObjects(sObjectTypes)
4. describeTabs()
5. GroupStructures(pairs)
A. Returns available category groups along with their data category structure for objects specified in the request.
B. Returns a map of all sObject names (keys) to sObject tokens (values) for the standard and custom objects defined in your organization.
C. Returns information about the standard and custom apps available to the running user.
D. Returns a list of the category groups associated with the specified objects.
E. Describes metadata (field list and object properties) for the specified sObject or array of sObjects.

A
  1. -> B. Returns a map of all sObject names (keys) to sObject tokens (values) for the standard and custom objects defined in your organization.
  2. -> D. Returns a list of the category groups associated with the specified objects.
  3. -> E. Describes metadata (field list and object properties) for the specified sObject or array of sObjects.
  4. -> C. Returns information about the standard and custom apps available to the running user.
  5. -> A. Returns available category groups along with their data category structure for objects specified in the request.
43
Q

True/False: apex:messages can be used to show a custom message on a VF page.

A

False.

apex:pageMessage is a custom message. apex:messages is used to show errors from the controller.

44
Q

True/False: apex:message can be used to show a custom error message for a specific field.

A

True

45
Q

In a VF page, what is the proper syntax for referencing an Image file name myImage.jpg in the images forlder of an archive name MyZip that has been loaded as a static resource?

  1. -apex:imageurl=”{!URLFOR(!$Resource.MyZip.zip, ‘images/myImage.jpg’)}”
  2. -apex:imageurl=”{!URLFOR(!$Resource.MyZip, ‘images/myImage.jpg’)}”
A
  1. -apex:imageurl=”{!URLFOR(!$Resource.MyZip, ‘images/myImage.jpg’)}”
46
Q

A custom component utilizes a custom controller.
Which attribute of the -apex:attribute- component must be used to data bind the value provided by the consumer to one of the custom controllers properties?
1. assign
2. assignTo
3. value
4. var

A
  1. assignTo
47
Q

True/False: Methods with the @future annotation must be static methods and can only return a void type.

A

True.

48
Q

True/False: Project Manifest and package.xml is the same?

A

True.

49
Q

True/False: The build.xml file specifies a series of commands to be executed by Ant. Within the build.xml file are named targets that process a series of commands when you run Ant with a target name.

A

True.