preapre a documentation based on job duties of the project

profileAv49
SalesforceDevelopmentTechnicaldocument.docx

TDS-001 Object Reassignment SDLC Template Version: 2.0

Object Reassignment SDLC Template Version: 2.0

SALESFORCE DEVELOPMENT

September 2019

Version 1.0

Table of Contents ASSIGN ME 0 Table of Contents 1 1 Document Revisions 2 2 General Information 3 2.1 Overview 3 2.2 Technical Description 3 2.3 Process flow 4 2.3.1 New Custom Objects 5 2.3.2 New Custom fields 5 2.3.3 Standard Objects 5 2.3.4 New Custom fields added 5 3 Visualforce Pages 6 3.1 Pages used 6 3.1.1 Page Layout 6 3.1.2 Custom Settings 6 3.1.3 APEX Class 7 3.1.4 APEX Test Class 7 3.1.5 APEX Trigger 7 3.2 Page and Page flow 8 Date Version Number Document Changes 09/02/2019 1.0 Initial draft Document Revisions

Object Reassignment SDLC Template Version: 1.0

FRS Template

Object Reassignment SDLC Template Version: 1.0

Confidential Page 0 of 8

Page 2

Page 2 of 7

General Information

Overview

Whenever user leaves the organization, the System Admin will deactivate that user. But there might be many records assigned to that user and all those records has to reassigned to someone in the organization (It might be his manager). To reassign the records System Admin who is going to deactivate the user will have to find all the records assigned to the user being deactivated and reassign all the records to his manager or the intended person one by one.

To achieve the above said scenario in few clicks, we must come up with this application called “ASSIGN ME”. This application has capability to reassign records from 5 major standard objects (Account, Contacts, Case, Lead and Opportunity) when a user is deactivated. Also, after the application is installed, there is an option to select/configure the Objects, record types and status, of which we want to reassign the records to deactivated user’s manager. Once the records are reassigned to manager, an email notification will be sent the manager informing him about the assignment of records. Then the manager has an option to reassign them to other users in the organization or keep them on his name.

Technical Description

Below are the technical details of the application on, how it works and details about different configurations we can do.

1. After “ASSIGN ME” Application is installed, there is an option to configure, where we can select the Objects, Record Types and status for which you want the records to be reassigned.

2. Selected objects and corresponding Record Types along with Status for all the selected Objects will be stored in custom settings.

3. ‘Deactivation Date’ field is added to the User object, when the User is deactivated the ‘Deactivation Date’ field will be populated with current date.

4. When the user is deactivated, then based on the values in the custom settings the records in the deactivated user’s name will be assigned to his manager and will be stored in ‘Object Reassignment’ custom object.

5. As soon as the records get reassigned to the deactivated user’s manager an email notification will be sent to manager.

6. Based on the notification, manager can login into Salesforce, go to ‘Object Reassignment’ tab and see all the records assigned to him.

7. In the ‘Object Reassignment’ tab there is option for manager to delete all the records from the ‘Object Reassignment’ without reassigning them to other users or he can reassign one or more records to other identified members in his team or organization.

8. Once the records are reassigned to other users by manager the records will be deleted from ‘Object Reassignment’.

Process flow

1) When the app is installed Record type and status will be selected in the Configure.

2) When the user leaves the Organization, Admin just need to deactivate the user in the organization.

3) Deactivated user records are available in the Object Reassignment and assigned to the respective Manager.

4) When Manager assign the record to other user, those records are deleted from the ‘Object Reassignment’. If not, records will be with Manager itself.

New Custom Objects

Object Name

API Name

Description

Object_ Reassignments

Object_Reassignments__c

New Custom fields

Field Label

Description

Data type

Controlling Field

Object Type

Picklist

Record Link

URL

User Being Deactivated

Text

Standard Objects

Object Name

API Name

Description

Account

Account

Contact

Contact

Cases

Cases

Opportunity

Opportunity

Lead

Lead

Users

Users

New Custom fields added

Field Label

API Name

Data type

Object

Description

Controlling Field

Deactivation Date

Deactivation_Date_c

Date

Users

Visualforce Pages

Pages used

Name of Page

Type

Description

ObjectReassignment

ObjReassignmentConfig

Page Layout

Buttons

Field Name

Default Values

Required /

Optional

Button

Change Record Ownership

Null

Button

Delete Object Reassignment

Null

Custom Settings

Object Name

API Name

Description

Standardobjects

Standardobjects_c

Account

Account_c

Contact

Contact_c

Case

Case_c

Opportunity

Opportunity_c

Lead

Lead_c

APEX Class

Class Name

Security level

Asynchronous call out ?

Description

UserTriggerHelper

TriggerHandlerClass

ObjectReassignmentController

ObjReassignmentConfigController

APEX Test Class

Class Name

Security level

Asynchronous call out ?

Description

UserTriggerHelper_Test

TriggerHandlerClass _Test

ObjectReassignmentController_Test

ObjReassignmentConfigController_Test

APEX Trigger

Class Name

Security level

Asynchronous call out ?

Description

AccountTrigger

ContactTrigger

OpportunityTrigger

CaseTrigger

LeadTrigger

User Trigger

Page and Page flow

1. Below is the configuration page to select the Objects.

Attach sample screen shots

2. Based on the selected objects in above step, there should be options displayed to select Record Types and status as shown below.

3. User can select all the record types and status from the above page and click on submit.

4. Once the submit button is clicked then the selected data will be stored into custom settings which will be later used for reassignment of deactivated user records.

5. Below screenshot shows the page, that would be opened when manager select the records from ‘Object Reassignment’ object for reassignment of records to other users of his team or organization

Page 6 of 7

StartInstall ͚ASSIGN ME͛�AppConfigureUser DeactivatedObject ReassignmentStill the records will be with the managerRecords will be reassigned to the new user Records will be deleted from Object ReassignmentManager changes the record ownerYesAccount, Contact, Case, Opportunity, Lead assigned based on Configuration settingEndNo

Start Install ‘ASSIGN ME’ App Configure User Deactivated Object Reassignment Still the records will be with the manager Records will be reassigned to the new user Records will be deleted from Object Reassignment Manager changes the record owner Yes Account, Contact, Case, Opportunity, Lead assigned based on Configuration setting End No