From 7023b2e0404fd925b37fa05faf0467b3fb65acb1 Mon Sep 17 00:00:00 2001 From: Paul Huliganga Date: Wed, 25 Feb 2026 13:19:44 -0500 Subject: [PATCH] docs: add template ID update instructions for sandbox refresh --- .../docs/DEPLOYMENT_AND_TESTING.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/composite-envelope-builder/docs/DEPLOYMENT_AND_TESTING.md b/composite-envelope-builder/docs/DEPLOYMENT_AND_TESTING.md index d67c05d..047d3b3 100644 --- a/composite-envelope-builder/docs/DEPLOYMENT_AND_TESTING.md +++ b/composite-envelope-builder/docs/DEPLOYMENT_AND_TESTING.md @@ -218,6 +218,75 @@ Apex Code Coverage: 92% --- +## Updating Template IDs After Sandbox Refresh + +After a sandbox refresh, Docusign template IDs may become stale and need updating with the correct demo/sandbox template IDs. + +### Find Your Demo Template IDs + +1. Log into your Docusign demo account: **https://demo.docusign.net** +2. Go to **Templates** +3. Click each template — the GUID is in the URL or under **Template ID** +4. Copy the template IDs you need + +### Option 1: Developer Console (Quickest) + +1. Open **Developer Console** (gear icon → Developer Console) +2. Click **Debug** → **Open Execute Anonymous Window** + +**Step 1: View current template IDs:** +```apex +List configs = [ + SELECT Id, Name, dfsle__DocuSignId__c + FROM dfsle__EnvelopeConfiguration__c + ORDER BY Name +]; +for (dfsle__EnvelopeConfiguration__c c : configs) { + System.debug(c.Name + ' → ' + c.dfsle__DocuSignId__c); +} +``` + +Check the **Logs** tab at the bottom for the output. + +**Step 2: Update with new template IDs:** +```apex +// Replace template names and IDs with YOUR values +Map updates = new Map{ + 'Template Name 1' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', + 'Template Name 2' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' +}; + +List configs = [ + SELECT Id, Name, dfsle__DocuSignId__c + FROM dfsle__EnvelopeConfiguration__c + WHERE Name IN :updates.keySet() +]; + +for (dfsle__EnvelopeConfiguration__c c : configs) { + c.dfsle__DocuSignId__c = updates.get(c.Name); +} +update configs; +System.debug('Updated ' + configs.size() + ' templates'); +``` + +### Option 2: Query Editor (View Only) + +In Developer Console → **Query Editor** tab: +```sql +SELECT Id, Name, dfsle__DocuSignId__c, Envelope_Template_Language__c +FROM dfsle__EnvelopeConfiguration__c +ORDER BY Name +``` + +### Option 3: Salesforce UI (Point and Click) + +1. Use **App Launcher** → search for **Docusign Envelope Templates** +2. Open each record → **Edit** +3. Update the **DocuSign template ID** field +4. **Save** + +--- + ## Post-Deployment Setup After successful deployment, configure your Salesforce org: