For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

1

Key Initialization

  • Condition: Always run (if values are not already set).

  • Details:

    • SDocsPrivateSettings__c.Key__c is initialized with a generated key.

    • SDocsPrivateSettings__c.ESign_Encryption_Key__c is initialized for eSignature encryption.

  • Purpose: Ensures cryptographic keys are available for secure operations.

2

Migration: GD_Link__cDocument_Link__c

  • Condition: Run if upgrading from version prior to 4.557.

  • Process: A batch job migrates existing values from SDoc__c.GD_Link__c to the newer SDoc__c.Document_Link__c field.

  • Purpose: Field schema evolution to support new document link architecture.

3

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.

4

Feature Job Scheduling

  • Condition: Only if the job is not already scheduled.

  • Details: Schedules the FeatureUpdateSchedulable Apex job.

  • Purpose: Enables feature-related background updates or checks.

5

Migration: Email_SendTo__cEmail_Send_To_Long__c

  • Condition: Run if upgrading from version prior to 6.0.

  • Process: Migrates values from the shorter text field on SDTemplate__c to a longer one to accommodate expanded email data.

  • Purpose: Prevents data truncation issues and supports future enhancements.

6

Action Record Cloning

  • Condition: Run if upgrading from version between 7.2 and 7.3.

  • Process: Clones Action__c object records into the new SDAction__c object.

  • Purpose: Supports migration to updated data schema.

7

Log Record Cloning

  • Condition: Run if upgrading from version between 5.2 and 8.2.

  • Process: Clones Log__c object records into the new SDLog__c object.

  • Purpose: Supports migration to updated data schema.

8

File Metadata Mapping

  • Condition: Run if upgrading from version prior to 9.0.

  • Process: A batch job assigns:

    • SDoc__c.File_ID__cContentDocument.Id

    • SDoc__c.File_Version_ID__cContentVersion.Id

  • Purpose: Supports transition to Salesforce Content (Files) model.

9

Auto-create conflict removal

  • Condition: Run if upgrading from version prior to 11.0.

  • Process: Query on SDTemplate__c finds templates with both SDOC__Create_Attachment__c and SDOC__Create_File__c set to TRUE and disables SDOC__Create_Attachment__c

  • Purpose: Allow Files to generate via legacy methods.

S-Sign

1

In-flight notifications

  • Condition: Always run (if values are not already set).

  • Details: Evaluates SSEnvelope_Document__c and SSEnvelope__c, sets Sends_Notifications__c on SSEnvelope__c to TRUE for qualifying records.

  • Purpose: Sets new field used in new Batch Notifications Job for existing requests.

Last updated

Was this helpful?