0% found this document useful (0 votes)
166 views

Module 04 - Creating Custom Objects

Module 04 - Creating Custom Objects
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views

Module 04 - Creating Custom Objects

Module 04 - Creating Custom Objects
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

Creating Custom Objects

Veeva Professional Services

Copyright 2012, Veeva Systems. All rights reserved.


Module Objectives
Define custom objects
Create a custom object
Add custom fields to a custom object:
Lookup
Master-Detail
Picklist
Configure field level dependency
Modify columns displayed in tabs, related lists, and search layouts
Create a custom application
Review Salesforce.com Platform Limits

2 Copyright 2012, Veeva Systems. All rights reserved.


Custom Objects

Copyright 2012, Veeva Systems. All rights reserved.


What is a Custom Object?

Custom objects are custom database tables that allow you


to store information unique to your organization

Veeva Pre-defined
Custom Objects

Product
Account List Address Call Call Detail Sample Lot
Catalog

Your organization may still need to define custom objects


For example: Training custom object to store data for your
companys training events

4 Copyright 2012, Veeva Systems. All rights reserved.


Custom Object Components

Standard
Fields
Custom
Custom
Button
Fields
and Links

Validation Page
Rules Custom Layouts
Object
Components

Related Record
Lists Types

Search
Triggers
Layouts

5 Copyright 2012, Veeva Systems. All rights reserved.


Steps to Create a Custom Object

1. Create custom object


2. Create custom fields
3. Define a custom tab for the object
4. Configure page layout(s)
5. Configure columns displayed for:
a) List view
b) Search layouts
c) Custom object tab

6. Configure record types


7. Assign page layouts

6 Copyright 2012, Veeva Systems. All rights reserved.


1. Create Custom Object

Setup Create Objects click the New Custom Object


button

Naming convention best practice


is to include companys initials as
the suffix

7 Copyright 2012, Veeva Systems. All rights reserved.


1. Create Custom Object

Auto Number creates an auto


number standard field.
Every record will have a value
automatically generated starting
with 001 and up to 10 digits long.

Create the custom object tab as


part of the wizard or add it later
manually

8 Copyright 2012, Veeva Systems. All rights reserved.


Standard Fields

All objects have standard fields


Standard fields cannot be deleted

Veeva adds __c to the Object API Name


which is used to reference the object in
configuration and code

4 standard fields are created when the


object was defined, including the (Name)
Auto Number field

9 Copyright 2012, Veeva Systems. All rights reserved.


2. Create Custom Fields
To create custom fields for custom objects go to:
Setup Create Objects [Object] Custom Fields and
Relationships section Click the New button
To create custom fields for SFDC standard objects such as
Accounts go to:
Setup Customize [Object] Fields Account Custom
Fields and Relationships Click the New button

Create menu: Veeva Customize menu:


custom objects and SFDC standard
any custom objects objects; mainly use
you create this for Accounts

10 Copyright 2012, Veeva Systems. All rights reserved.


2. Create Custom Fields

11 Copyright 2012, Veeva Systems. All rights reserved.


2. Create Custom Fields

Select the Field Type and click Next


Field types are explained in the wizard and in the SFDC Custom
Field Types help page
See Appendix for additional information

12 Copyright 2012, Veeva Systems. All rights reserved.


2. Create Custom Fields Naming Convention

Field names should be self explanatory


Add company initials as a suffix to custom object/field
names, e.g., Medical_Inquiry_ID_TR__c (where TR is the
company name)
Dont restrict it by adding country or business unit codes as they will
become useless when expanding down the road

13 Copyright 2012, Veeva Systems. All rights reserved.


2. Create Custom Fields Description

Description should be meaningful to address future changes


What happens when customer wants to add a new business unit?
What happens when customer wants to add a new country?
What happens to the integration mappings?
Is it clear to that new implementation team what these changes will
affect and who?

14 Copyright 2012, Veeva Systems. All rights reserved.


2. Create Custom Fields Establish FLS
For every custom field you create, the wizard allows you to
establish the Field Level Security

Make the field visible


for all profiles or
specific profiles

15 Copyright 2012, Veeva Systems. All rights reserved.


2. Create Custom Fields Add to Page Layout
For every custom field you create, the wizard allows you to
add the field to a page layout

Custom object wizard


automatically creates the page
layout which you can edit later

16 Copyright 2012, Veeva Systems. All rights reserved.


Field Type Lookup Relationship
Creates a relationship between two records of different
objects
Example: associate a particular contact with a training event
Allows users to click a lookup icon and select a record
(Contact) from a popup window
On the associated record (Contacts), you can then display a
related list to show all of the records (Training) that are linked
to it
On the contact record, see all the training events he/she attended
Deleting a record does not delete the associated lookup
record

17 Copyright 2012, Veeva Systems. All rights reserved.


Field Type Lookup Relationship

Wizard allows you to pick the


object to relate to

Add custom related lists

Wizard automatically adds a


related list for the object in
all Contact page layouts

18 Copyright 2012, Veeva Systems. All rights reserved.


Field Type Master-Detail Relationship
Creates a relationship between a record of a parent
(master) object and records of a child (detail) object
For example, one account (master) can have one or more training
events (detail)
Master record controls certain behaviors of the detail record
Deleting master record will automatically delete all associated child
records
Available for custom objects only
You can create a master-detail relationship field on a custom object
that links to a standard object

19 Copyright 2012, Veeva Systems. All rights reserved.


Field Type Master-Detail Relationship
Once you decide which object is
the master and which is the
detail, go to the detail object Account
and create a Master-Detail Master
Relationship field

Training
Detail

20 Copyright 2012, Veeva Systems. All rights reserved.


Field Type Master-Detail Relationship

Wizard allows you to pick the


Master object to relate to

Add detail object related list


to master objects page
layouts

21 Copyright 2012, Veeva Systems. All rights reserved.


Lookup vs. Master-Detail Relationship

Lookup Master-Detail

Access to parent Not required Required


record

Record deletion No effect on associated When deleting master record,


records automatically deletes the
associated child (detail) records
Re-parent object Yes No

Roll-up Summary No Yes (on the master object)

Required field No Yes

SFDC Limit 25 per object 2 per object

22 Copyright 2012, Veeva Systems. All rights reserved.


Field Type Picklist Field
Allows users to select a value from a list you define
For example, Course Status picklist should have values Planned,
Confirmed, and Cancelled

Enter each picklist


field value on a
separate line

23 Copyright 2012, Veeva Systems. All rights reserved.


Dependent Picklists

Make values in one picklist field dependent on values from


another picklist field
Must identify both the controlling and dependent picklist
fields
For example, Course Status values only display when Course
Registration value = Open, otherwise none of the Course Status
values will display

24 Copyright 2012, Veeva Systems. All rights reserved.


Dependent Picklists

To create a new picklist field dependency:


1. Setup Create Objects [Object] and click the Field
Dependencies button
2. Click the New button to create a new dependency
3. Select the Controlling Field and the Dependent Field

25 Copyright 2012, Veeva Systems. All rights reserved.


Dependent Picklists

Configure the dependent picklist field value(s) for each


controlling picklist field value

When Course Registration value


When Course Registration
is Closed then all Course Status
value is Open then all Course
values are excluded and field is
Status values are available
grayed-out

26 Copyright 2012, Veeva Systems. All rights reserved.


Object Validation Rules

Validation rules verify that the data a user enters in a record


meets the standards you specify before the user can save the
record
Can contain a formula or expression that evaluates the data in one
or more fields and returns a value of True or False
Display an error message to the user when the rule returns a value
of True due to an invalid value
For example, you may require users to enter a Start Date for a
training course when the Course Status value is Confirmed

See Appendix for more information


27 Copyright 2012, Veeva Systems. All rights reserved.
3. Create a Custom Tab for the Object

If users will need to access the custom object from its own
tab then define a custom tab for the object:
Setup Create Tabs and click the New button
Select the Object and Tab Style

28 Copyright 2012, Veeva Systems. All rights reserved.


3. Create a Custom Tab for the Object

Configure which profile will


have access to the new tab

Configure which application


will display the new tab:
vBioPharma

29 Copyright 2012, Veeva Systems. All rights reserved.


4. Configure Page Layouts

Page Layouts determine


how records will display
to the users
Page Layouts display in
two modes:
View/Read Mode
Edit Mode
Note: Formula fields,
read-only fields, and
related records are not
displayed in Edit mode

30 Copyright 2012, Veeva Systems. All rights reserved.


4. Configure Page Layouts

To modify a page layout for a custom object:


Setup Create Objects [Object] Page Layout section
and click the Edit button
Note: Administrator can also access the page layout
configuration page by clicking the Edit Layout link when viewing
the detail page of an object

31 Copyright 2012, Veeva Systems. All rights reserved.


4. Configure Page Layouts

Page Layout
Properties

Components you can place


on the page layout
Click X to remove
section from page layout
Individual fields can be
dragged around/off the
page layout

Click on the wrench


to edit section
properties
Related list properties can
be edited or removed

32 Copyright 2012, Veeva Systems. All rights reserved.


4. Configure Page Layouts

Configure columns and buttons for related lists


Move desired fields to the Selected
Fields list and use the arrows to
Click wrench to display the arrange the display order
properties of the related list

Specify a Sort
By field

Expand the buttons section to configure


the standard (New) or custom buttons

33 Copyright 2012, Veeva Systems. All rights reserved.


5. Configure Search Layouts

After configuring custom page layout(s), modify:


Search Results Add/remove custom fields to display on search
results page
Lookup Dialogs Add/remove custom fields to display on lookup
dialogs
Custom Object Tab Add/remove custom fields to display on the
custom object tab
Custom Object List View Add/remove custom fields to display on
the custom list view

34 Copyright 2012, Veeva Systems. All rights reserved.


5. Configure Search Layouts

To modify search layouts for a custom object:


Setup Create Objects [Object] Search Layouts section
and click the Edit button next to one of the search layouts

35 Copyright 2012, Veeva Systems. All rights reserved.


5. Configure Search Layouts

For each search layout configure the fields you need to


display

Move desired fields to the


Selected Fields list and use
the arrows to arrange the
display order

36 Copyright 2012, Veeva Systems. All rights reserved.


6. Configure Record Types

Each object can have multiple record types


For example, Account record types include Hospitals, Hospital
Departments, Group Practice, MCO, Professional, Staff
Record types allow you to offer:
Picklist values
Page layouts to different users based on their profiles
Recommend creating no more than 200 record types

37 Copyright 2012, Veeva Systems. All rights reserved.


7. Assign Page Layouts

To assign a page layout:


Setup Create Objects [Object] Page Layout section and
click the Page Layout Assignment button

Setup Manage Users Profiles [Profile] Standard or


Custom Object Layout section and click the View Assignment link
next to the desired object

38 Copyright 2012, Veeva Systems. All rights reserved.


7. Assign Page Layouts

Click the Edit Assignment button to


assign different page layout per
profile for each record type

39 Copyright 2012, Veeva Systems. All rights reserved.


7. Assign Page Layouts

1. Click to select the cell(s)


for the record type/profile 2. Assign the desired
you want to modify. page layout
Control+click to select
multiple cells.

40 Copyright 2012, Veeva Systems. All rights reserved.


Custom
Applications

Copyright 2012, Veeva Systems. All rights reserved.


Applications

Application is a collection of tabs used for specific tasks


To enhance usability so that only necessary tabs are
presented to a set of users based on their profiles
For example, Sampling Admin app for samples administrator

42 Copyright 2012, Veeva Systems. All rights reserved.


Creating Custom Applications

To define a custom application:


Setup Create Apps and click the New button
Define the tabs you want to display
Define which profile should have access to the custom app

Move the desired


tabs to the Select
Tabs section

43 Copyright 2012, Veeva Systems. All rights reserved.


SFDC / Veeva
Platform Limits

Copyright 2012, Veeva Systems. All rights reserved.


SFDC / Veeva Platform Limits

Key System Limits


Full Sandboxes 1 per org
Custom Objects 2,000 per org
Custom Fields 800 per object
Custom Picklist 15,000 total char limit
Up to 1,000 entries
Up to 255 characters per entry

Field History Tracking (audit trail) 20 per object

Long Text Area Fields 25 per object

Rich Text Area Fields 25 per object

45 Copyright 2012, Veeva Systems. All rights reserved.


SFDC / Veeva Platform Limits Continued

Key System Limits Continued


Roll-up Summary Fields 10 per object
Master-Detail Relationship 2 per object
Active Lookup Filters 5 per object
External IDs 3 per object
Validation Rules 500 per object
Active Rules 50 per object (workflow, assignment, auto-
response, and escalation rules)
Sharing Rules 100 per object, including up to 50 criteria-
based rules

46 Copyright 2012, Veeva Systems. All rights reserved.


SFDC / Veeva Platform Limits Continued

Requests can be made to SFDC to increase limits


SFDC considers business case, performance implications, and other
factors when deciding whether to increase a limit
Limits are subject to change in future SFDC releases
Refer to Salesforce website for the full list for the Unlimited
Edition:
https://help.salesforce.com/apex/HTViewHelpDoc?id=limits.htm&langu
age=en

47 Copyright 2012, Veeva Systems. All rights reserved.


Module Summary
Defined custom objects
Created a custom object
Added custom fields to a custom object:
Lookup
Master-Detail
Picklist
Configured field level dependency
Modified columns displayed in tabs, related lists, and search
layouts
Created a custom application
Reviewed Salesforce.com Platform Limits

48 Copyright 2012, Veeva Systems. All rights reserved.


Labs
Create a custom object

For more information, see Appendix at


the end of this module

49 Copyright 2012, Veeva Systems. All rights reserved.


Appendix:
Field Types

Copyright 2012, Veeva Systems. All rights reserved.


Formula Field

Allows users to automatically calculate values based on


other values or fields such as merge fields
Read-only by default

51 Copyright 2012, Veeva Systems. All rights reserved.


Formula Field Continued
Formula Wizard makes it easier to build and check the
syntax of formulas
Refer to the SFDC Building Formulas help page

Insert fields, operators,


functions, and check syntax

52 Copyright 2012, Veeva Systems. All rights reserved.


Roll-up Summary
Automatically displays the record count of related records or
calculates the sum, minimum, or maximum value of related
records
For example, a custom Account roll-up summary field called Total
Number of Trainings displays the number of Training custom
object records in the Training related list for Accounts
Roll-Up Summary fields are read-only by default
SFDC Limit: 10 Roll-up Summary Fields per object

53 Copyright 2012, Veeva Systems. All rights reserved.


Roll-up Summary Continued

Account 1. Go to the master object


Master
and create a Roll-Up
Summary field

Training
Detail

2. Specify the
Summarized Object

3. Select the Roll-Up


Type

4. Specify the Filter


Criteria

54 Copyright 2012, Veeva Systems. All rights reserved.


Appendix:
Object Validation
Rules

Copyright 2012, Veeva Systems. All rights reserved.


Object Validation Rules

Validation rules verify that the data a user enters in a record


meets the standards you specify before the user can save the
record
Can contain a formula or expression that evaluates the data in one
or more fields and returns a value of True or False
Display an error message to the user when the rule returns a value
of True due to an invalid value
For example, you may require users to enter a Start Date for a
training course when the Course Status value is Confirmed

56 Copyright 2012, Veeva Systems. All rights reserved.


Create Object Validation Rules

To create a validation rule for a custom object:


Setup Create Objects [Object] Validation Rules section
and click the New button
To create a validation rule for the Accounts object:
Setup Customize Accounts Validation Rules and click the
New button

57 Copyright 2012, Veeva Systems. All rights reserved.


Create Object Validation Rules Continued

Enter the error condition formula using the wizard

1. Build the error


condition formula

2. Check Syntax to
detect errors in the
formula

3. Specify the error


message users will
see

4. Indicate where the


error message should
be displayed

58 Copyright 2012, Veeva Systems. All rights reserved.


Appendix:
Record Types

Copyright 2012, Veeva Systems. All rights reserved.


Configure Record Types
Hospital Page Layout Professional Page Layout

Hospital Record Type Professional Record Type


Picklists Segmented for Hospitals Picklists Segmented for Professionals

Accounts Object
# of Beds # of Depts Account Name Credentials Specialty Gender

Accounts
ID

WEBSITE

# BEDS

# DEPARTMENT

ACCT NAME

SUFFIX
CREDENTIALS

DO NOT CALL?

SPECIALTY

GENDER
SFDC Data Storage

60 Copyright 2012, Veeva Systems. All rights reserved.


Configure Record Types
Can have one or more record types for the same object
Each record type can also have one or more page layout(s)
associated with it
Address Object Call Object

Page Layout Page Layout Page Layout


1 1 2

Record Type Record Type Record Type Record Type


1 2 1 2

Object Object

61 Copyright 2012, Veeva Systems. All rights reserved.


Configure Record Types

To create record types for a custom object:


Setup Create Objects [Object] Record Types section and
click the New button
To create or modify record types for the Accounts object:
For business accounts: Setup Customize Accounts Record
Types and click the New button or the Edit link of an exiting
business account
For person accounts: Setup Customize Accounts Person
Accounts Record Types and click the New button or the Edit link
of an exiting person account

62 Copyright 2012, Veeva Systems. All rights reserved.


Appendix:
Workflow

Copyright 2012, Veeva Systems. All rights reserved.


Workflow Rules

Workflow Rules execute tasks when designated conditions


are met

Available Actions:
Email alerts 1. Create 3. Add Time
2. Add
Assigning a task Evaluation Trigger
Actions
Field updates Criteria (Optional)
Outbound Messages

Actions can be immediate or time-dependent

64 Copyright 2012, Veeva Systems. All rights reserved.


Approval Processes
Automated process to approve records
Can initiate workflow actions
Specifies:
Steps necessary for record approval
Who must approve at each step
Criteria necessary for records to be approved, rejected,
recalled or first submitted for approval
Plan and map approval process prior to creation

65 Copyright 2012, Veeva Systems. All rights reserved.


Configuration of Workflow Rules and Approvals
To create workflow rules and approval process:
Setup Create Workflow and Approvals
Workflow rules apply to a single object
Cannot delete a workflow with pending actions, can only deactivate

Approval Processes
Complex business processes that require planning
Follow Approval process instructions
Queue
Monitor and cancel time dependent actions
66 Copyright 2012, Veeva Systems. All rights reserved.

You might also like