Post-Install Script Overview
Purpose: Upon installation or upgrade of the managed package, the system executes a post-install script that handles various configuration, migration, and data transformation tasks. The logic is conditional based on the existing org configuration and the version being upgraded from.
🧩 Steps Performed by the Script
S-Docs
Key Initialization
Condition: Always run (if values are not already set).
Details:
SDocsPrivateSettings__c.Key__cis initialized with a generated key.SDocsPrivateSettings__c.ESign_Encryption_Key__cis initialized for eSignature encryption.
Purpose: Ensures cryptographic keys are available for secure operations.
Migration: GD_Link__c → Document_Link__c
Condition: Run if upgrading from version prior to 4.557.
Process: A batch job migrates existing values from
SDoc__c.GD_Link__cto the newerSDoc__c.Document_Link__cfield.Purpose: Field schema evolution to support new document link architecture.
DOCX File Name Decryption and Escaping
Condition: Run if upgrading from version prior to 4.557.
Process: A batch job decrypts and character-escapes legacy DOCX file names.
Purpose: Ensures compatibility with current file handling logic.
Feature Job Scheduling
Condition: Only if the job is not already scheduled.
Details: Schedules the
FeatureUpdateSchedulableApex job.Purpose: Enables feature-related background updates or checks.
Migration: Email_SendTo__c → Email_Send_To_Long__c
Condition: Run if upgrading from version prior to 6.0.
Process: Migrates values from the shorter text field on
SDTemplate__cto a longer one to accommodate expanded email data.Purpose: Prevents data truncation issues and supports future enhancements.
Action Record Cloning
Condition: Run if upgrading from version between 7.2 and 7.3.
Process: Clones
Action__cobject records into the newSDAction__cobject.Purpose: Supports migration to updated data schema.
Log Record Cloning
Condition: Run if upgrading from version between 5.2 and 8.2.
Process: Clones
Log__cobject records into the newSDLog__cobject.Purpose: Supports migration to updated data schema.
File Metadata Mapping
Condition: Run if upgrading from version prior to 9.0.
Process: A batch job assigns:
SDoc__c.File_ID__c→ContentDocument.IdSDoc__c.File_Version_ID__c→ContentVersion.Id
Purpose: Supports transition to Salesforce Content (Files) model.
Auto-create conflict removal
Condition: Run if upgrading from version prior to 11.0.
Process: Query on
SDTemplate__cfinds templates with bothSDOC__Create_Attachment__candSDOC__Create_File__cset toTRUEand disablesSDOC__Create_Attachment__cPurpose: Allow Files to generate via legacy methods.
S-Sign
In-flight notifications
Condition: Always run (if values are not already set).
Details: Evaluates
SSEnvelope_Document__candSSEnvelope__c, setsSends_Notifications__conSSEnvelope__ctoTRUEfor qualifying records.Purpose: Sets new field used in new Batch Notifications Job for existing requests.
Last updated
Was this helpful?

