Defining Page Layouts

  • Browser

  • iPad

Veeva Events Management uses a page layout engine to determine which page layout to use based on a set of inputs. A page layout represents the data displayed in the user interface. The purpose of the engine is to provide a dynamic user interface that displays different information depending on several factors. This differs from the standard behavior of the Salesforce.com platform, where page layouts are determined based on user profile and record type.

The following four objects are supported by the page layout engine:

  • EM_Event_vod
  • EM_Expense_Estimate_vod
  • Expense_Header_vod
  • Expense_Line_vod

The page layout is determined based on the following factors:

  • The event record type
  • The country where the event takes place
  • The start date of the event
  • The status of the event (e.g. requested, approved)
  • The profile of the user
  • The role of the user on the event team

Page Layout Engine

The page layout engine allows granular control over what fields are available and editable on a given page, as well as the related lists and the ability to create related records. Permissions can change for specific users based on any of the six factors above.

For example, a default page layout can be set for one sales representative not involved with the event, and another page layout can be given to the sales representative hosting the event.

Configuration for the page layout engine is defined in the EM_Event_Layout_vod object. Records in this object are associated with an Event Configuration set, so rules apply within the context of an event type and a time period.

Fields included in the Event Layout object are:

Field

Instructions

Event Configuration

  • Required
  • Lookup to the associated Event Configuration set

Event Status

  • Required; case sensitive
  • Event Status determines which page layout displays for the user.
  • This value must be in the Status_vod picklist on the EM_Event_vod object.

User Profile

  • Optional
  • The profile for which this page layout is used
  • Populate with the name of the profile

Event Team Role

  • Optional
  • The event team role for which this page layout is used
  • Populate with the name of the event team role
  • This value must be in the EM_Event_Team_Member_vod.Role_vod field

Event Layout

  • Required; case sensitive
  • Populate this field with the name of the page layout to be used based on the parameters from the page layout engine
  • This page layout must exist on the EM_Event_vod object

To view the available list of page layouts, select the Refresh Metadata button on the Event Configuration Console.

Expense Estimate Layout

  • Optional; case sensitive
  • Populate this field with the name of the page layout to be used based on the parameters from the page layout engine
  • This page layout must exist on the EM_Expense_Estimate_vod object

Expense Header Layout

  • Optional; case sensitive
  • Populate this field with the name of the page layout to be used based on the parameters from the page layout engine
  • This page layout must exist on the Expense_Header_vod object

Expense Line Layout

  • Optional; case sensitive
  • Populate this field with the name of the page layout to be used based on the parameters from the page layout engine
  • This page layout must exist on the Expense_Line_vod object

Visible Buttons

  • Optional (if blank, no buttons will display)
  • Case sensitive
  • Lists the buttons available on the Event detail page.
  • Populate this field with a semicolon-delimited list of button names. E.g. ;Submit_for_Approval_vod;Edit;Delete;
  • Supported buttons include:
  • Edit
  • Delete
  • Submit_for_Approval_vod
  • Reschedule_vod
  • Cancel_Event_vod
  • Close_vod
  • Approve_vod
  • Reject_vod
  • Record_a_Call_vod

    This button requires users to have access to the Event_vod record type on the Call2_vod object.

  • Unlock_vod
  • View_Signatures_vod
  • Custom buttons on the EM_Event_vod object with a source of OnClick JavaScript

    Custom buttons with a Visualforce page source are not supported.

  • If a button is intended to change the status of an event, you must define an Event Action for this button name. More information can be found here: Defining Page Layouts

Country Override

  • Lookup to an Event Configuration Country record
  • Use this field to configure a specific page layout that only applies to a single country
  • If blank, the event layout record applies to all countries associated with the configuration set

Page Layout Ranking

Event Layout records determine which page layout is visible to a user when viewing or editing an event. Because you can have multiple page layouts for a given event type, a ranking process is used to determine which layout is displayed when an event is loaded.

Each Event Layout record is associated with an Event Configuration record, and that Event Configuration record is associated with a group of countries. An Event Layout is only considered for the user if it is within the context of the event type, country, and time frame from these associations.

For example, assume the following data: (Rows with the same background color are part of the same configuration set:)

Event Configuration:

Three Event Configuration records: 2 for speaker programs (EC1 and EC2) and one for congresses (EC3).

Event Type

Start Date

End Date

ID

Speaker_Program_vod

1/1/2015

12/31/2016

EC1

Speaker_Program_vod

1/1/2015

12/31/2015

EC2

Congress_vod

2/1/2015

8/1/2016

EC3

Event Configuration Country:

One speaker program configuration (EC1) is valid for US and Canada. The other speaker program configuration (EC2) is valid for Brazil. The congress configuration (EC3) is valid for Mexico

Event Configuration ID

Country

ID

EC1

United States

ECC1

EC1

Canada

ECC2

EC2

Brazil

ECC3

EC3

Mexico

ECC4

Event Layout

The following event layout records are related to EC1, and therefore only apply to speaker programs in the US and Canada between January 1st, 2015 and December 31st, 2016.

Event Configuration ID

Event Status

Team Role

Profile

Event Layout

Country Override

ID

EC1

Requesting_vod

 

Primary Care

RQ_US_PC

ECC1

EL1

EC1

Requesting_vod

 

Primary Care

RQ_PC

 

EL2

EC1

Requesting_vod

 

Specialty

RQ_SP

 

EL3

EC1

Requesting_vod

 

Marketing

RQ_MK

 

EL4

EC1

Requesting_vod

 

 

RQ_Base

 

EL5

EC1

Requesting_vod

Organizer_vod

Primary Care

RQ_PC_Org

 

EL6

EC1

Requesting_vod

Organizer_vod

 

RQ_Org

 

EL7

EC1

Pending_vod

 

 

PD_Base_CA

ECC2

EL8

In this example, there are eight records which determine the user interface on which page layout to load. EL1 is valid in the US only. EL2 through EL7 are valid in the US and Canada. EL8 is valid in Canada only.

Within this configuration set, a ranking method is used to determine which page layout should display to a user. This allows for configuration of simple layouts to more specialized layouts based on a user’s profile or role on an event team. It is also possible to build configuration valid for multiple countries, and then have one-off exceptions if one country needs a specific layout and scenario.

Before any ranking, the following parameters must match:

  • Event Type
  • Country
  • Start time of the event with configuration time frame
  • Event Status

After matching these parameters, the ranking is as follows. This comparison is done between the user variables (team role and user profile), the event variables (Status, Type, Start Date, Country), and the event configuration set:

  1. Country Override, team role, and user profile.
  2. Country Override and team role.
  3. Country Override and profile.
  4. Country Override (team role and user profile are blank.
  5. Team role and user profile.
  6. Team role.
  7. User profile.
  8. Team role and user profile are blank.
  9. If no matches are found, the standard page layout is returned based on event record type and user profile. It is recommended to set a fallback page layout for each event status to prevent this scenario, and a backup layout using Salesforce’s standard page layout configuration as a lowest-level configuration.

If multiple conflicting results are returned by the matching algorithm, it is a misconfiguration and error displays. This is to prevent unintentionally returning a layout that allows the user to edit information that should not be editable.

Country overrides are always ranked at the top. For any user with the Primary Care profile in the US, the RQ_US_PC (EL1) layout is used, regardless if the user is an event organizer or not. Therefore EL1 is ranked higher than EL6 for an event in the US.

EL6 is used for an event in Canada for a user that is an organizer with the Primary Care profile. If an organizer of the event in any other profile views the event, EL7 is used. If any Primary Care user who is not an event organizer views the event, EL2 is used. If a specialty or marketing user views the event in US or Canada, layouts EL3 and EL4 are used. If any user without a defined configuration for role and profile views the event, EL5 is used.

Applying Page Layouts

Any time a page layout or Event Layout record is updated:

  1. Navigate to the Event Configuration Console.
  2. Select Refresh Metadata.
  3. Clear the Veeva Cache.

Event Layout Rules Caching

Administrators can configure Events Management to cache generated page layouts. This improves performance when a user loads an event as the page layout does not need to be retrieved from the SFDC database. See Event Layout Rules Caching for more information.

Troubleshooting

For testing purposes, the zvod_Event_Layout_vod field reads out the name of the page layout being used. This field should be placed on all page layouts, with read permission for admins only. This verifies the correct page layout is in use. The screenshot below is an example of the zvod_Event_Layout_vod field displaying the name of the page layout in use.

For more advanced troubleshooting, the user’s activity log in iPad also stores any occurrences where a layout is not found.

Expense Object Layouts

The page layout engine is used for Expense Estimates, Expense Headers, and Expense Lines objects. This allows or prevents viewing and editing different fields in the user interface depending on the status of the event.

The layout for these three objects is based on the event status, not the status of the expense record.

This configuration is stored in the Event Layout record

Buttons on Expense Objects

Supported buttons are Edit and Delete. These buttons display if they are on the page layout and the user has permissions to perform these actions.

Page layouts for Other Objects

The page layout engine framework is used for defining the page layouts used for Events, Expense Estimates, Expense Headers, and Expense Lines. For all other Events Management objects, the page layout displayed to the user is the standard Salesforce page layout, which is determined by the user’s profile and the record type.

Extended Object Support for the Page Layout Engine

Admins can configure the page layout to display and determine who can edit, and what fields can be edited based on the status of the Event and the Related Object record type.

In addition to EM_Event_vod, the following objects are now supported by the page layout engine:

  • EM_Attendee_vod
  • EM_Event_Budget_vod
  • EM_Event_Material_vod
  • EM_Event_Session_Attendee_vod
  • EM_Event_Session_vod
  • EM_Event_Speaker_vod
  • EM_Event_Team_Member_vod
  • Expense_Estimate_vod
  • Expense_Header_vod
  • Expense_Line_vod

Admins can assign page layouts for supported related objects on the EM_Event_Layout_vod object with the Related_Object_Layout_vod record type.

For example, the admin for Verteo Biopharma does not want all users who are event organizers to edit the meal opt-in option for Attendees on a completed event. The admin creates a new EM_Event_Layout_vod record for the EM_Attendee_vod object for the completed event with a record type of Related_Object_vod and assigns an Attendee page layout where the meal opt-in field is read only.

Configuration

  1. Enable the following Visualforce pages to view and edit the supported objects:

    • EM_Attendee_Edit_vod - set to override the Edit page for EM_Attendee_Edit_vod
    • EM_Attendee_View_vod - set to override the View page for EM_Attendee_Edit_vod
    • EM_Event_Budget_Edit_vod - set to override the New and Edit page for EM_Event_Budget_Edit_vod 
    • EM_Event_Budget_View_vod - set to override the View page for EM_Event_Budget_View_vod 
    • EM_Event_Material_Edit_vod - set to override the New and Edit page for EM_Event_Material_Edit_vod 
    • EM_Event_Material_View_vod - set to override the View page for EM_Event_Material_View_vod 
    • EM_Event_Session_Attendee_Edit_vod - set to override the New and Edit page for EM_Event_Session_Attendee_Edit_vod 
    • EM_Event_Session_Attendee_View_vod - set to override the View page for EM_Event_Session_Attendee_View_vod
    • EM_Event_Session_Edit_vod - set to override the New and Edit page for EM_Event_Session_Edit_vod 
    • EM_Event_Session_View_vod - set to override the View page for EM_Event_Session_View_vod
    • EM_Event_Speaker_Edit_vod - set to override the Edit page for EM_Event_Speaker_Edit_vod 
    • EM_Event_Speaker_View_vod - set to override the View page for EM_Event_Speaker_View_vod
    • EM_Event_Team_Member_Edit_vod - set to override the New and Edit page for EM_Event_Team_Member_Edit_vod 
    • EM_Event_Team_Member_View_vod - set to override the View page for EM_Event_Team_Member_View_vod
  2. Assign the admin user access to the Related_Object_Layout_vod record type on the EM_Event_Layout_vod object.
  3. Grant admin users FLS Edit permission and end users Read permission to the following fields on the EM_Event_Layout_vod object:

    • Event_Object_Name_vod
    • Record_Type_vod
    • Page_Layout_vod

Use

Admins can extend the page layout engine to the supported objects. To do this:

  1. Create a new Event Layout.
  2. Select the Record Type Related Object.
  3. Select Continue.
  4. Select the Event Object Name. This is the supported objects list from the page layout engine.
  5. Enter the appropriate information for all fields.

    To view the available list of page layouts, select the Refresh Metadata button on the Event Configuration Console.

  6. Select Save.

For example, the Closed Event Budget Layout is assigned when the Event Status is Closed_vod for the Event Budget page.

Page layouts for related objects display based on the following factors:

  • Record type of the selected record
  • Event Status (e.g. requested, approved)
  • Country override (The country where the event takes place)
  • User role
  • The profile of the user

If a page layout is not found, the standard SFDC page layout displays.

To use the page layout engine for the Expense_Estimate_vod, Expense_Header_vod, Expense_Line_vod objects, remove FLS Read permission to the following fields on the EM_Event_Layout_vod object:

  • Expense_Estimate_Layout_vod
  • Expense_Header_Layout_vod
  • Expense_Line_Layout_vod

See Defining Page Layouts for more information.

Buttons for Other Events Management Objects

The Edit and Delete buttons for related objects on the event detail page display based on the Visible_Buttons_vod field on EM_Event_Layout_vod records for each related event object. If an Event Layout record is not, the buttons display based on object level Edit and Delete permissions.

Special Considerations for Event Page Layouts

  • The Status, Start Time, and Country fields should not be editable on the Event page layout. Use the Reschedule button to change an event time, and also recalculate which layout is used.
  • There can never be two Event Configuration sets with overlapping time periods for the same event type / country combination.
  • To ensure base cases are covered for any user who may attempt to access an event, create Event Layout configurations from the bottom up with relation to the ranking algorithm. Start by creating a single page layout assigned to all record types that have limited fields and related lists, no edit button, and read-only fields. Then, create a base layout for each event status.
  • On iPad, the page layout engine is only used when a connection is present. Related lists and buttons display differently depending on connection status.
  • The Owner First Name and Owner Last Name fields are not supported on related lists for the EM_Event_vod object.
  • Events Management objects do not support the Event History related list

Buttons on the Event Header

The buttons that display at the top of an Event record in the browser, and on iPad when an internet connection is present, are defined in the Visible_Buttons_vod field on the Event Layout record.

To configure the Visible_Buttons_vod field:

  • Optional (if blank, no buttons display)
  • Case sensitive
  1. List the buttons available on the Event detail page.
  2. Populate this field with a semicolon-delimited list of button names E.g. ;Submit_for_Approval_vod;Edit;Delete; Supported buttons include:
  • Edit
  • Delete
  • Submit_for_Approval_vod
  • Reschedule_vod
  • Cancel_Event_vod
  • Close_vod
  • Approve_vod
  • Reject_vod
  • Record_a_Call_vod (Online and iPad platforms)
  • Unlock_vod
  • View_Signatures_vod
  • Custom buttons that change an event's status. For detail on how to define these buttons see Defining Event Flows.

Any change made to the visible buttons requires clearing the Veeva Cache to display. If the cache is not cleared, changes display when the cache expires (16 hours).

Example Configuration

Resulting Event

Edit and delete always display at the top on iPad. All other buttons display based on their order within the Visible_Buttons_vod field.

Buttons on Page Layout Engine Related Lists

The page layout engine is used to derive page layouts for Events, Expense Estimates, Expense Headers, and Expense Lines objects.

The New button on Event related lists (e.g. Attendees, Event Speakers) is controlled by the page layout. In the screenshot below, the + button in the top right is based on the New button being present on the page layout. Viewing an event in the browser also follows this configuration.

On iPad, the + button on related lists is only based on the page layout for first-level related lists for the Event, Expense Estimate, Expense Header, and Expense Line objects. If there is another related list two levels down from one of these pages (for example, a related list on the Event Speakers page layout), the+ button displays based on:

  • Create permissions for connected objects
  • Create permissions and visibility to the Mobile_ID_vod field for offline objects

If an iPad user does not have an internet connection, creation of records is limited and the configuration is different. See iPad Connected and Disconnected Modes for more information.

To assist with configuration management, Veeva recommends enabling the Page Layout Organizer feature.