Supporting Custom Objects in the Account Plan Hierarchy
- Browser (Classic)
- Windows Tablet
The Account Plan Hierarchy setting now supports custom objects in the hierarchy. This also enables Account Plan Sharing, Progress Calculation, and the Export to PPT features to consider and make use of any custom defined object along with Veeva objects.
The following are key considerations and restrictions for defining the hierarchy:
- The hierarchy is defined using the org-level Account_Plan_Object_Hierarchy_vod custom setting
- The feature only supports org-level custom settings
- The top-most hierarchy level is Account Plan
- The bottom-most hierarchy level is either Call Objective or Action Item
- The first object in the comma-delimited list (if defined) corresponds to the second level of the hierarchy (for example, the level immediately below the Account Plan itself)
- The second object in the comma-delimited list (if defined) corresponds to the third level of the hierarchy
- The third object in the comma-delimited list (if defined) corresponds to the fourth level of the hierarchy
- Progress displays in all levels of the Account Plan Object Hierarchy, from the top (Account Plan) level to the lowest or most granular level of planning
- Each level is a rollup of the preceding level
For example, an Account Plan consists of several Account Tactics with multiple Action Items linked to them. This is represented with the following value in the org-level Account_Plan_Object_Hierarchy_vod Veeva Setting:
In this example, Progress on the Account Tactic level displays based on the Status of Action Items while Progress on the Account Plan level displays based on the Status of Account Tactics.
Configuring Custom Objects in the Account Plan Hierarchy
To add a custom object to the Account Plan Hierarchy and include it in record sharing and progress rollup calculations:
- Create a custom object. There are no restrictions on the object name.
- Create a lookup to the related object. The API name must match the related object's API name. For example, Plan_Tactic_vod.
- Create the Share With field with FLS edit permission for the user who is responsible for setting the values and appropriate FLS permission for end users. This step is only for first-level objects immediately below the Account Plan in the hierarchy).
- Field Name - Share_With_vod
- Data Type - Picklist
- Picklist Values - Sales_vod, Medical_vod, Market_Access_vod
- Create an Apex Sharing Reason with the name Veeva_Account_Plan_Sharing_vod.
- Create a trigger and a handler Apex Class, following VeevaPlanTacticTrigger and VeevaPlanTacticTriggerHandler used for Plan_Tactic_vod as an example. This enables dynamic sharing of records for the custom object.
- Apex Class - Create the Apex class using any preferred naming convention that extends VeevaAccountPlanSharingTriggerHandler by following VeevaPlanTacticTriggerHandler and replace Plan_Tactic_vod__c with the API Name of the custom object
- Trigger - Create the trigger using any preferred naming convention by following VeevaPlanTacticTrigger as the reference and replace Plan_Tactic_vod__c with the API Name of the custom object
- Create the Status field with FLS edit permission for the user who scheduled the batch class, and appropriate FLS for end users:
- Field Name - Status_vod
- Data Type - Picklist
- Picklist Values - Completed_vod, Pending_vod
- Create the Progress field with FLS edit permission for the user who scheduled the batch class and appropriate FLS permission for end users:
- Field Name - Progress_vod
- Data Type - Percent(18,0)
Add the custom object to the desired level of the hierarchy in the org-level Account Plan Object Hierarchy Veeva Setting. The object must be after the Account Plan and before the lowest level of the hierarchy.
Because of the difference in how mobile apps handle custom settings, the profile-level setting value should be the same as the org-level setting.
- Create appropriate VMOCs for the custom object for offline devices.