Wednesday, July 2, 2014

Change your trigger on the fly using Custom Settings



Preface: this post is part of the Advanced Apex Concepts series.
Custom Settings are a hidden gem in Apex that always impresses people, especially bosses!
Custom Settings are variables that you use in your code but set and modify outside of your code.
Here’s an example:
You’re writing a trigger that sets a “Customer Service Rep” field on an Account every time there’s a high value Opportunity associated with it. Two things are certain: (1) The CSR on duty changes every week and (2) the threshold for a “high value” opp changes often since your company is expanding.
A perfect use case to use Custom Settings to set the CSR on duty and the “high value” opp threshold!
Benefits of using Custom Settings:
  • Change your variables through Salesforce.com without deploying code!
  • Any non-coder admin can now modify your variables and change how your code works!
  • Show your boss that you’re thinking ahead and not just concerned with doing the bare minimum!
Step 1: Create a Custom Setting “object” for your trigger:
Setup >> Develop >> Custom Settings >> New

Step 2: In your Custom Setting object, create Custom Fields for each needed variable:

Step 3: Create a Custom Setting record and edit its variables
Navigate to your Custom Setting >> Manage >> New

Step 4: Use your Custom Setting in your code!
trigger AddCSR on Opportunity (before insert) {
// Grab your Custom Setting values CSR_Settings__c settings = CSR_Settings__c.getInstance('csr'); String CSR_USER_ID = settings.CSR_User_ID__c; Decimal OPP_MIN_VALUE = settings.Opp_Minimum_Value__c;
// Create a master list of accounts to bulk update List<Account> accounts = new List<Account>(); for (Opportunity opp : Trigger.new) { // Make sure we meet the minimum threshold
if (opp.Amount >= OPP_MIN_VALUE) {
// This is a trick to get the related account! Account acc = new Account(); acc.Id = opp.AccountId; // Update the CSR and add to master list
acc.CSR__c = CSR_USER_ID;
accounts.add(acc); } } // Update the master list of accounts update accounts; }
Now if you need to edit the CSR on duty or the minimum Opportunity amount threshold, simply edit the record in Step 3 – no rewriting or deploying code necessary!
One important note – custom Settings aren’t automatically transferred between sandboxes and production, so make sure you include them in both places or your code will break!

How to create cases and contacts from LiveAgent Pre-chat API

The many different configuration options available and base out-of-the-box functionality make Salesforce Live Agent especially appealing for a web chat product. The Pre-Chat API in the Pre-Chat form is the focus of this article.

Collecting information from chat customers prior to them being connected to an agent is a common use case of web based chats. Providing that information to the agents before they interact with the chat customer will increase the agents’ productivity since they won’t have to take time to manually ask those questions. Live Agent has an optional Pre-Chat form that can be provided for the chat customer to fill out prior to the start of the chat. The methods available are documented as the Pre-Chat API in the Live Agent Developer’s Guide. The Pre-Chat API can be used to search for or create records automatically when a chat customer submits the Pre-Chat form. The Pre-Chat API is an API that is very powerful and interesting. The “code” that you write is actually just HTML input elements that conform to the API. Before you can use a Pre-Chat form there is some configuration set up that must be done. For a detailed look at all of the different options available for Live Agent see the Salesforce.com Help Page: Setting Up Live Agent.

Configuration Set Up

The Pre-Chat form can be placed in a Visualforce page and accessed via a Force.com Site or you can place it in a non Salesforce website. Before the Pre-Chat form can be used you must specify its location in the Chat Button customization. There is a field called Pre-Chat form URL that allows you to specify the URL for the page that has your Pre-Chat form on it. That’s the field you should use to specify a non Salesforce URL. There is another field called Pre-Chat form Page that is a Lookup to a Visualforce page that has your Pre-Chat form in it, which you would use if you were hosting the Pre-Chat form on a Force.com Site. If you are deploying to your non Salesforce website then you can just leave that blank.
Chat Button Configuration
Chat Button Configuration
In the Deployment configuration you need to make sure that you add the domain where you deploy Live Agent to the Permitted Domains field. Note that you must also check the Allow Access to Pre-Chat API checkbox.
Chat Deployment Configuration
Chat Deployment Configuration

Pre-Chat Form Code

The Live Agent Developer’s Guide has a very basic Pre-Chat form code sample from which to start. I’ve created a Pre-Chat form that is much more complex to explore the different features available.  The code below is a Pre-Chat form that I created that collects input, searches for a Contact, creates one if not found, creates a Case, links the Contact to the Case, and the Case and Contact to the Live Chat Transcript record. Below is the Pre-Chat form screen, followed by the code and a detailed explanation.
Client Chat Window
Client Chat Window
The Live Agent HTML page code is available in this Gist.
The JavaScript takes the endpoint URL parameter passed from the deployment page and makes it the action for the form, so that the form is submitted to the proper place. There is nothing that needed to be changed from what was provided in the Developer’s Guide.
You can specify custom details on the live agent chat. These will be displayed in the Details of the Chat for the agent and the hover pop that is displayed when the agent mouses over the accept chat button. The format is name="liveagent.prechat:<detailName> and you can specify whatever values you want. When you are reading the Pre-Chat API documentation and you see reference to detailName, that’s referring to the value you specify after the colon in liveagent.prechat:<detailName>. These values will appear on the hover of request and on the Visitor Details screen.
Chat Connection Pop
Chat Connection Pop
The custom details values are not automatically saved on The Live Chat Transcript record. To do that you need to actually create a corresponding custom field on the Live Chat Transcript and use the save input, e.g., <input type="hidden" name="liveagent.prechat.save:yourCustomDetail" value="Your_Custom_Field__c" />. Note that you can use hidden inputs for the custom details. The custom details in the code from above is:
Once you have the details set up, you can specify how they should get mapped into Salesforce. You create one Map per Object. In each map you specify the Object’s field name, custom detail name and you separate each pair with a semi-colon. In the code sample, the Contact and the Case are mapped:
Once you have the fields mapped you can specify that you want to search for an existing record using the doFind input. If you only want to find exact matches you can use the isExactMatch input. If more than one match is found Salesforce will dispaly a search results list. In the code sample, the Contact’s email is used to search:
If nothing is found in the search, Salesforce will not automatically create a new record. To do that you must use the doCreate input. If you use both the doFind and the doCreate, Salesforce will attempt to find and if it doesn’t it will create. If it does find it will not create. In the code sample, a Case is always created and a Contact is only created if the doFind doesn’t find one. The doCreate lets you specify which fields you want included on the new record. For instance, you might want to use a field in the doFind that you wouldn’t want on a newly created record. The code from above is:
You do not have to use the doFind.  You could just use the doCreate if you don’t want to search.  Likewise, you don’t have to use the doCreate, you could just use the doFind.
You can specify which records should be displayed in the console when found or created with the showOnCreate input. The code from above shows both the Contact and the Case:
The Live Chat Transcript Object has Lookup fields to both Case and Contact. Use the saveToTranscript method to have those Lookups set to the found or created records. The code from above is:
Lastly, of course, you want to link the Contact and the Case. The Pre-Chat API has a linkToEntity input that does just that. What’s really cool about this is that it links the Case to a found Contact or a newly created one. The code from above is:
You need to be careful about how you specify the fields that need to be created. They are case sensitive as @PepeFloyd noted on the SFSE (upvote it!).

Custom Fields

In the above example all of the fields are standard fields on standard objects.  If you need to map a custom field, you need to use the API name of the custom field.  For example, if you have a custom text field on the Case called Service Tag that has an API name of Service_Tag__c you would map it using Service_Tag__c.  The above mapping for the Case would change to the following.

Troubleshooting

During the course of development you may run into a few issues.  I’ve noted some common ones that I’ve observed below.
  1. Your chat is showing up as offline to the chat customer. It could be that you don’t have any agents online. You must have at least one user in the Service Console with their Live Agent status set to Online. The Live Agent deployment is smart enough to know when no agents are available.
  2. Make sure that you added your domain to the permitted domains in the Deployment configuration.  If it isn’t there chat customers will not be able to connect.
  3. If you aren’t using an Online and Offline image, make sure that you’ve edited the Chat Button Code to add online and offline text inside the anchor/hyperlink tag. They default to an HTML comment.
  4. Build your form incrementally, one field/function at a time. The form will not work if you have syntax errors. It’s much easier to pinpoint causes of failure when you build incrementally.
  5. If you are attempting to create a record make sure that you have values for required fields set.  If you don’t the record can’t be created.
  6. Lastly, if you are still stuck, you can inspect the requests and responses with the Chrome Developer console. For example, I observed that if the domain hasn’t been permitted the response is “Domain is not whitelisted for this deployment”.
Live Agent also integrates nicely with Salesforce Knowledge!

Salesforce Developer certification DEV 401 Dumps-4

Under what circumstances is a workflow rule triggered? 

A. When the manager submits it to workflow 

B. Automatically when the record is saved

C. When the user submits it for workflow 

Answer: B

A manager wants to share specific fields of data with his subordinates that only he has access to. 

What is the best way to share specific fields of data? Please select two choices. 

A. Run report as scheduled reports and e-mail distribution 

B. Folder permission on a report(Missed) 

C. Select the view dashboard as with his own name 

D. Folder permission on a dashboard 

Answer: A

Universal container tracks position as a custom object in a recuriting application. When position 

records are created, they have a status of New and are visible to only the position owner. Once a 

position goes through an approval process, the status is changed to approved. 

A. Create a sharing rule that states the approved positions are shared with the entire 

organization 

B. Create an Apex Trigger that automatically updates sharing on a position once 

the status is approved(Missed)

C. Create a workflow field update the updates a custom field called sharing on a 

position once the status is Approved 

D. Create a formula field that updates the sharing on a position once the states 

changes to Approved 

Answer: A

Which kinds of custom component can be added to home page? 

A. HTML Area

B. Bookmarks 

C. Links 

D. Image/Logo 

E. Script Area 

F. Image Area 

Answer: A, C, D

Home Page Default' layout is editable. 

A. True 

B. False

Answer: A

The Data Model has a direct association with the view layer in the Model-View-Controller 

Model. 

A. True 

B. False

C. Maybe 

D. None of the above 

Answer: B

We can only change help text of event standard fields. 

A. True 

B. False

Answer: A

We can assign home page layout to profile. 

A. True 

B. False 

Answer: A

We can change column kind of 'HTML Area' custom component. 

A. True 

B. False

Answer: A

Custom Formula fields do NOT support which of the following functional expression ? 

A. Adding multiple records together 

B. Combine text strings together 

C. If/then/else conditional statements 

D. Clickable image buttons 

Answer: A

In Salesforce what is the maximum number of fields that can be added to an object? 

A. 800

B. 100 

C. 200 

D. There is no such limit on the number of fields 

Answer: A

Which of the following cannot be used to build a complete Custom Tab? 

A. Display the approval process using an Apex page 

B. Display data using a VisualForce page 

C. Show data from a custom object using the native user interface 

D. Display an external web page

Answer: A

Which one does NOT apply to Custom Formula Fields ? 

A. Custom Formula Fields can reference other formula fields 

B. Custom Formula Fields can reference standard fields 

C. Custom Formula Fields can reference custom fields 

D. Custom Formula Fields can calculate across objects

Answer: D

How many Dynamic Dashboards are allowed for an Organization ? 

A. 5 

B. 3 

C. 10 

D. 7 

Answer: A

Dynamic Dashboards can have a Scheduled Refresh ? 

A. True 

B. False 

Answer: A

Can Dashboard Components be retrieved from Recycle Bin on deletion ? 

A. Yes 

B. No

Answer: A

Based solely on the role hierarchy a manager can do all of the following EXCEPT : 

A. View records his subordinate does not own but can view 

B. Extend sharing on both his/her and his/her subordinate's records 

C. View all folders his/her subordinate has access to, i.e., Reports, Documents, 

and Email Templates 

D. View, edit, delete, and transfer his/her and his/her subordinate's records 

Answer: C

A Record Type may determine the default value of a picklist field. 

A. True 

B. False

Answer: A

A Field hidden from Field Level Security is available from ? 

A. Reports 

B. Console 

C. Page Layout 

D. Search 

E. None of the Above

Answer: E

Salesforce Developer certification DEV 401 Dumps-3

1. A field flagged as an External ID is not required to be unique.   True / False   --- 

Answer: True

2. What is the impact of changing the Locale?

A Date Format
B Currency
C Time Zone
D Business Hours
E Language

Answer: A, B

3. A field designated as required, is only required when it is added to a user's page layout   TRUE/FALSE

Answer: False

4. Validation rules don't apply if you create new records for an object with Quick Create. – 

Answer: False

5. Which of the following statements about Queues are true? (Select all that apply.)

A Queues define a pool of users that own an object.
B A list view is automatically created for a new Queue.
c Queues route requests sequentially through a pool of users.
D Ownership of a record assigned to a Queue my be taken by any user in the queue or those above them in the role hierarchy

Answer: C, D

6. A user has not been granted field-level access to a field on a custom object. A field update will fail if the user executes Apex logic that attempts to modify that field – 

Answer: False

7. Field hidden by field level security is still visible through the API. – 

Answer: False

8. Of the three levels of Record Access (Full Access, Read/Write, and Read Only), which privileges does someone with Read/Write have?

A. Edit
B. Delete
C. Transfer ownership
D. Share

Answer: A, D

9. What elements does a custom object automatically contain when it is created? (Select all that apply.)

A Record Type
B Field Sets
C Queues
D Standard Controller
E Page Layout

Answer: D, E

10. Sharing settings can allow other groups, roles, profiles, or users access to a Queue.

Answer: False

11.  When is a Cross-Object formula field calculated?

A When an update is scheduled
B When the record is created or updated
C When it is viewed
D When the related object record is created or updated 

Answer: B, D

Salesforce Developer certification DEV 401 Dumps-2

Salesforce Developer certification DEV 401 Dumps-2

Default values can be set on the Dependent Picklist Fields?
A. True
B. False
What can cross-object formulas reference
A. Child object records only
B. Both parents and child object records
C. Parent object records only
D. Records of the same object
http://www.infallibletechie.com/2013/08/cross-object-formulas.html
Which function records the database operations, system processes, and errors that occur when executing a transaction or while running unit tests?
A.
System Log
B.
 Debug Log
C.
 Monitoring
D.
Setup Audit Trail








 
What must a developer consider when inserting records using an API based tool choose 2
A.
Apex triggers are ignored
B.
Universally required field setting are respected
C.
Validation rules are respected
D.
Required fields on page layouts are enforced


4. 
What type of field needs to be wrapped in a function (inside a formula) to be accessed?
A.
Date Today() Function
B.
Picklist (ISPICKVAL) function
C.
Case
D.
IF/Then
What will cause the analytic snapshots run to fail? Please select three (3) choices.
A. The running user has been inactivated
B. The source report has been deleted
C. The target object has a trigger on it
D. The target object is a custom object
E. The source report is saved as matrix report
Analytical snapshot supports all types of report ? No. It supports Tabular and Summary.
When creating a sharing rule, what entities can data be shared to? Please select three (3) choices.
A. Queues
B. Users
C. Public groups
D. Roles and subordinates
E. Roles
An organization wants to use custom objects to track bugs. The organization wants the ability to link related bugs to parent bugs in a parent-child relationship. What type of relationship should be used?
A. Many-to-many
B. Hierarchically
C. Master-Detail
D. Self
In a master-child relationship between a standard object and custom object which of the following statements is NOT true? Please select two (2) items.
A. The standard or custom object can be a master
B. The custom object is always the master
C. The standard object is never a child
D. The custom object is always a child
E. The standard object is always the master
An organization has two custom objects to track job positions and salaries for those positions. Everyone in the organization should be able to view the positions, however, only select users can view the salary records. What steps should a developer take to ensure the requirement is fulfilled?

A) Create a lookup relationship between positions and salaries; define public access on position and private access on salary
B) Create a master-detail relationship between positions and salaries; define public access on position and private access on salary.
C) Create a master-detail relationship between positions and salaries; define private access on position and create sharing rules on salary.
D) Create a lookup relationship between positions and salaries; define public access on position and public access on salary; create sharing rules on salary to restrict visibility.
'Home Page Default' layout is editable.
A. True
B. False
HTML Area' custom components can be in
A. Wide (Right) Column
B. Narrow (Left) Column
Image/Logo' custom components can be in
A. Narrow (Left) Column
B. Wide (Right) Column
Standard components on home page is not editable except
A. Tasks
B. Custom Links
C. Calendar
D. Messages & Alerts
E. Customer Portal Welcome
F. Recent Items
G. Items to Approve
H. Create New...
I. Dashboard Snapshot
Custom links have behaviors
A. Display in existing window with sidebar and header
B. Display in existing window without header
C. Display in new window
D. Display in existing window without sidebar or header
E. Display in existing window with sidebar
F. Display in existing window with header
G. Execute JavaScript
H. Display in existing window without sidebar
We can only change help text of task standard fields.
A. True
B. False
We can assign home page layout to profile.
A. True
B. False
Task custom field are same as event custom field.
A. True
B. False
Custom links' standard component contains up to how many bookmarks?
A. 10
B. 20
C. 5
D. 15
The showChatter attribute is available on which Visualforce component?
A. apex:chatter
B. apex:pageBlock
C. apex:detail
D. apex:page
A sales manager would like to view a dashboard from the perspective of different users and switch between users without editing the dashboard. How would an administrator enable this?   Choose 2 answers  
A. Create the dashboard as a dynamic dashboard.
B. Grant the sales manager the "Manage Dynamic Dashboards" permission.
C. Grant the sales manager the "Drag-and-Drop Dashboard Builder" permission.
D. Grant the sales manager the "View My Team's Dashboards" permission.
What can users do when Chatter feed tracking is enabled for dashboards?   Choose 2 answers  
A. Follow files and links for a dashboard.
B. Auto-follow dashboards created by the user.
C. Follow posts and comments for the dashboard source reports.
D. Follow posts and comments for a dashboard.
Which combination of objects is available when creating a custom report type for Chatter reports?   Choose 2 answers  
A. Chatter Groups, Members
B. Opportunities, Followers, User Feed
C. Accounts, User Feed, Comments
D. Users, User Feed, Comments
Which is a capability of the improved System Log console?   Choose 3 answers  
A. View feedback on usage against governor limits
B. Run as a specific user
C. Execute anonymous blocks
D. Generate a dialog box when a usage limit is reached
E. View a stack trace
Which is a capability of Visualforce components for Chatter?   Choose 2 answers  
A. Include a Chatter feed on a record detail
B. Include Chatter followers on a record detail
C. Include Chatter recommended people to follow on a record detail.
D. Include a list of Chatter-enabled fields on a record detail.
Which function is available in the report builder interface, prior to running the report?   Choose 2 answers
A. Printable view
B. Schedule future runs
C. Save
D. Export details
E. Show/hide details
For the order management application, the developer has created a custom object to store the product line and product combination. When creating an order, the product line and product combination need to be consistent. What is the best option for implementing this?
a. Use a workflow to update the product automatically based on the product line
b. Create a validation rule using IF
c. Create a formula field to enforce the combination
d. Create a validation rule using VLOOKUP
1.         If the amount is less than 10000USD then no need of any approval or else it has to be approved from VP. How do you achieve this in force.com?
a.       By Creating a parallel approval process
b.      By Creating a dynamic approval process
c.       By Creating Validation Rule
d.   Create Approval Process

10. Custom Fields are store for how many days after deletion
1.       10 Days
2.       30 Days
3.       15 Days
4.       100 Days

Standard Pick list cannot be a dependent picklist Choose the correct answer
1.       It can be in some cases
2.       It depends on the version of Salesforce.com you are using
3.       This is correct, Standard picklist can only be a controlling picklist
4.       This is incorrect, Standard picklist can be a controlling as well as dependent picklist

Which are true in Import Wizard?
a)      It can de-duplicate record
b)      Can Import, update, delete and export data.
c)      Perform Matching based on record id only
d)      It can provide success and error files in csv.
 Using Import Wizard can we delete the records?
a)      Yes
b)      No
Custom objects will not have the following
1.       Assignment rules
2.       Validation Rules
3.       Approval Process
4.       Field Level Security
For which objects we can create a Queue? Select 3 choices:
1.      Leads
2.      Accounts
3.      Custom Objects
4.      Cases
5.      All object
You are creating a new object Y and you want to add that in the CREATE NEW picklist present in the left hand side bar. What you need to do?
1.      Add a tab
2.      Edit the Create New present in the setup of Home Page Component and add the object Y
3.      Creating a new object automatically creates an entry in the Create New Picklist
4.      Enable the option for the object Y in the profile

An organization needs the ability to view the value of Opportunity Stage field on an Opportunity Product related list. Please choose the declarative method of fulfilling the requirement. Choose the Right answer
1.        Create an Apex method to replicate the value on the child object, and set the field level security to read-only and expose the new field on the Opportunity Product related list.
2.        Create a cross object formula field on the Opportunity Product object and expose the formula field on the Opportunity Product related list.
3.       Create a validation rule on the Opportunity Product object.
4.        Create a new pick list field called Stage on the Opportunity Product object, and expose the filed on the Opportunity Product related list.

 A job application object has a child review object to store candidate review. The review needs to be tracked between a score of 1 to 5. The score has to be a choice between 1 and 5 displayed as a radio button. How will a developer cater to this requirement? Choose the Right answer
1.       Create 5 fields for scores (1 to 5) of type radio-button and use it in review page layout.
2.       Create a dependent pick list that feeds the radio button type field.
3.       Create a formula field
4.       Create visual force page with radio buttons for review object
What makes the Lookup field is required in Master – detail relationship
1.      Field Data Type
2.      Record data type
3.      Report Type
4.      Field Level Security
What are the standard fields on the user object? Select 3 options
1. Locale
2. Delegated Approver
3. Division
4. Hire Date  
Who can b owner of a record
1.      user
2.      Profiles
3.      sys admin
4.      Queues
Which among these cant b used in a user object.(Select 3 Options)
1.      tagging
2.      custom field
3.      custom button
4.      related list

One or more Interviewers can interview a candidate & give them marks for Technical Expertise and Management Expertise. How this can be achieved
1.      Add two fields Technical Expertise and Management Expertise in the Candidate object.
2.      Create a new object Marks that has a lookup with Job application and add these fields there.
3.      Add two fields Technical Expertise and Management Expertise in the Job Application object.
4.      None of the above
39. Which of the following is wrong? Select two choices
                          i.      Job Application (Master)
- Reviews (Detail)
                        ii.      Candidates (Master)
- Job applications (Detail)
- Reviews (Detail)
                      iii.      Candidate (Master)
-          Job Applications (Detail)
-   Reviews (Detail & Master of Job Applications)
                      iv.      Position (Master)
-          Campaigns (Detail)
How do Salesforce enforce data access using role hierarchy? Choose the Right answer
-          Users are given access to the records owned by the users who are below the role hierarchy.
-          Users are given access to the records owned by the users who share the same role on the role hierarchy.
-          Users are given access to the records accessible by the users who are below the role hierarchy.
-          Users are given access to the records accessible by the users who are above the role hierarchy
Any member in a Queue has the same access to all records in the queue that an owner would have. True or False
a)      True
b)      False
Choose the ones which are applicable Record Type allow developers to associate __________ and ___________ to users based on their profile. Choose Only Two options:
a)      Pick list value
b)      Role
c)      Business Process
d)      Hidden Characters
e)      Subclassing
f)       Forecasting
g)      Error Handling

Page Layout controls the following Field properties Except: Select 2 which is applicable,
a)      Visible
b)      Read Only
c)      Read Write
d)      Required
e)      Data Management

All the statements are true regarding Sharing Rules Except: Select the correct choice
a)      Automatic Exceptions to Organization Wide Defaults for a particular group of users
b)      Never permitted to be more restrict the Organization Wide Default settings
c)      Used to open up access to records
d)      Can to be more restrictive than Organization Wide Defaults

Setup Audit Trail changes are tracked for___ days select the correct answer
a)      50
b)      100
c)      180
d)      200
Field history tracking allows users to choose up to ____ fields per object Select the correct answer
a)      5
b)      10
c)      20
d)      40
e)      15

There is an account object. All the users should be able to see the records but user Y should not see the email address field. How would you achieve this?
a.       Field level security.
b.      Profiles
c.       Sharing Rules
d.      OWD
Which of the following falls under Declarative View Layer of Salesforce MVC pattern:
a)      Field Creation
b)      Record Types
c)      Validation Rules
d)      Force.com Sites
When do users have the option to manually share records from the detail page.
a)      when OWD for the object is public R/W
b)      when developer grant the user the share record permission
c)      when u add the sharing button
d)      when the OWD for the object is private
When developer adds custom object tab in app. Where all it is available.
a)      Sidebar Search
b)      Quick Create (will be available when Tab is displayed in u r tabs list)
c)      Recent Item
d)      Custom Reporting
e)      Create New Sidebar component
Dashboards are used to display?
a)      Data of standard report only
b)      Data of custom reports only
c)   Both
d)      None

What are the options you can set at Page Layout? Select 2 choices:
a)      Read only
b)      Required
c)      Visible
d)      Mandatory
Record Types Controls,
a)      Visibility of the fields
b)      Permissions
c)      Picklist values
d)      None