Salesforce Post-Install Guide

Summarize and analyze this article with:

Pankaj Tripathi Content Writer | Published: (Updated: )

After you install the EDocGen package from AppExchange, complete these steps so Generate Document works: update the Named Credential, create action buttons, and save EDocGen Configuration[cite: 9].

Before you start: Have your EDocGen username and password ready from https://app.edocgen.com[cite: 9]. If you need a different server environment, contact EDocGen Support for the URL and credentials[cite: 9].

1. Modify the Named Credential

The package includes an EDocGen Named Credential[cite: 9]. Update it with your account credentials so Salesforce can authenticate to the EDocGen server[cite: 9].

  1. Click the gear icon (top right) and open Setup[cite: 9].
  2. In Quick Find, search for Named Credential and open Named Credentials[cite: 9].
  3. Open the Edocgen Named Credential and click Edit[cite: 9].
  4. Set the fields as follows[cite: 9]:
Identity Type
Named Principal
Authentication Protocol
Password Authentication
Username
Your EDocGen username (for example, edocgenusername@gmail.com)
Password
Your EDocGen password
Named Credentials list in Setup
Figure 1: Named Credentials list in Setup[cite: 9]
Edit Named Credential (Named Principal + Password Authentication)
Figure 2: Edit Named Credential (Named Principal + Password Authentication)[cite: 9]

Click Save[cite: 9].

2. Create buttons for Generate Document

You can add Generate Document on any object (for example, Contract, Order, Account)[cite: 9]. Create a Lightning Action for single-record generation and/or a List Button for bulk generation[cite: 9].

2.1 Single document generation

  1. In Setup, open Object Manager and select the object[cite: 9].
  2. Open Buttons, Links, and Actions[cite: 9].
  3. Click New Action[cite: 9].
  4. Fill in[cite: 9]:
FieldValue
Action TypeLightning Component[cite: 9]
Lightning Componentedocgen:Templates[cite: 9]
Height250px (default; change if needed)[cite: 9]
Labele.g. Generate Document[cite: 9]
Namee.g. Generate_Document[cite: 9]
Buttons, Links, and Actions
Figure 3: Buttons, Links, and Actions[cite: 9]
New Action: Lightning Component edocgen:Templates
Figure 4: New Action: Lightning Component edocgen:Templates[cite: 9]

Click Save, then add the action to the page layout[cite: 9]:

  1. Open Page Layouts for the object and edit the layout you use[cite: 9].
  2. Select Mobile & Lightning Actions[cite: 9].
  3. Drag your button (for example, Generate Document) into Salesforce Mobile and Lightning Experience Actions[cite: 9].
  4. Click Save[cite: 9].
Page Layouts
Figure 5: Page Layouts[cite: 9]
Generate Document on the record detail page
Figure 6: Generate Document on the record detail page[cite: 9]

2.2 Multiple document generation

  1. On the same object, open Buttons, Links, and Actions[cite: 9].
  2. Click New Button or Link[cite: 9].
  3. Fill in[cite: 9]:
FieldValue
Labele.g. Generate Documents[cite: 9]
Display TypeList Button[cite: 9]
Behavior Display in existing window with sidebar
or without sidebar
or without sidebar or header[cite: 9]
Content SourceURL[cite: 9]
URL/flow/edocgen/EDocGen[cite: 9]
New Button or Link
Figure 7: New Button or Link[cite: 9]
List Button URL: /flow/edocgen/EDocGen
Figure 8: List Button URL: /flow/edocgen/EDocGen[cite: 9]

Attach the button to the list view[cite: 9]:

  1. Open List View Button Layout and click Edit[cite: 9].
  2. Move your button from Available Buttons to Selected Buttons[cite: 9].
  3. Click Save[cite: 9].
List View Button Layout
Figure 9: List View Button Layout[cite: 9]
Generate Documents on the object list view
Figure 10: Generate Documents on the object list view[cite: 9]

3. Configure EDocGen Configuration

Complete this configuration before generating documents[cite: 9].

Open the EDocGen app

  1. Click the App Launcher (9-dot icon)[cite: 9].
  2. Search for EDocGen and open the app[cite: 9].
  3. Open the EDocGen Configuration tab[cite: 9].
Open EDocGen from the App Launcher
Figure 11: Open EDocGen from the App Launcher[cite: 9]

The page shows Configuration Guidelines and Configuration Details[cite: 9]:

  • Named Credential[cite: 9]
  • Success Callback Apex Class[cite: 9]
  • Failure Notification Emails[cite: 9]
EDocGen Configuration page
Figure 12: EDocGen Configuration page[cite: 9]

Click Edit Configuration to update the fields below[cite: 9].

Configure EDocGen Integration dialog
Figure 13: Configure EDocGen Integration dialog[cite: 9]

3.1 Named Credential

Choose which Named Credential EDocGen uses for document generation[cite: 9]. In most orgs, select the package-provided EDocGen / Edocgen credential (after you set username and password in Setup)[cite: 9].

To connect a different EDocGen environment, create a new Legacy Named Credential with details from EDocGen Support, then select it here[cite: 9].

Before creating a custom Named Credential, contact EDocGen Support for[cite: 9]:
  • Server URL (for example, https://app.edocgen.com or another environment URL)[cite: 9]
  • Username[cite: 9]
  • Password[cite: 9]

Create a Legacy Named Credential (optional)

  1. Setup > Quick Find > Named Credentials[cite: 9].
  2. Click the dropdown next to New > New Legacy[cite: 9].
  3. Complete[cite: 9]:
FieldExample / guidance
LabelEDocGen New[cite: 9]
NameEDocGen_New (API name)[cite: 9]
URLServer URL from Support (e.g. https://app.edocgen.com)[cite: 9]
CertificateLeave blank[cite: 9]
Identity TypeNamed Principal[cite: 9]
Authentication ProtocolPassword Authentication[cite: 9]
Username / PasswordValues from EDocGen Support[cite: 9]
New Legacy Named Credential
Figure 14: New Legacy Named Credential[cite: 9]
Saved custom Named Credential available in Configuration
Figure 15: Saved custom Named Credential available in Configuration[cite: 9]

3.2 Success Callback Apex Class

Optional. Specify an Apex class that EDocGen calls after a document is successfully generated and uploaded[cite: 9]. Use this for custom business logic (update records, notify users, chain automation)[cite: 9].

Create the callback class

  1. Setup > Apex Classes > New[cite: 9].
  2. Requirements[cite: 9]:
  • Class must be global[cite: 9].
  • Must implement edocgen.ConnectorToOrg.ConnectorInterface[cite: 9].
  • Must include global void handleDocumentGenerateSuccess(Map<String, String> generateSuccessMap)[cite: 9].
global class EDocGen_SuccessCallBack
    implements edocgen.ConnectorToOrg.ConnectorInterface {

    // Called by EDocGen after successful document generation.
    global void handleDocumentGenerateSuccess(Map<String, String> generateSuccessMap) {
        System.debug(
            'Inside EDocGen_SuccessCallBack.handleDocumentGenerateSuccess: '
            + generateSuccessMap
        );
        // Add your custom business logic here.
    }
}

The callback runs only after EDocGen successfully generates and uploads the document[cite: 9]. After saving the class, enter the class name in Success Callback Apex Class on the Configuration page[cite: 9].

Values in generateSuccessMap

KeyDescription
templateId Template Id used for generation[cite: 9].
objectAPIName API name of the Salesforce object[cite: 9].
recordIds Comma-separated successful record Ids[cite: 9].
recordIdWithContentVersionIdMap JSON string: Record Id to ContentVersion Id for each generated file[cite: 9].
// Example
generateSuccessMap = {
  templateId = a0BXXXXXXXXXXXX,
  objectAPIName = Account,
  recordIds = 001XXXXXXXXXXXX,001YYYYYYYYYYYY,
  recordIdWithContentVersionIdMap = {
    "001XXXXXXXXXXXX":"068AAAAAAAAAAAA",
    "001YYYYYYYYYYYY":"068BBBBBBBBBBBB"
  }
}

Need full code snippets and invocation options? See the complete Apex Quickstart Guide[cite: 9].

3.3 Failure Notification Emails

Enter one or more email addresses that should receive alerts when document generation or upload fails[cite: 9]. Separate multiple addresses with commas[cite: 9].

Examples

admin@company.com

admin@company.com,support@company.com,salesforce@company.com[cite: 9]

Save the configuration

  1. Review Named Credential, callback class, and failure emails[cite: 9].
  2. Click Save Configuration[cite: 9].
  3. Confirm the success message. New settings apply to future generation requests[cite: 9].
Configuration saved successfully
Figure 16: Configuration saved successfully[cite: 9]
You’re ready. Open a record or list view, use your Generate Document button[cite: 9], or execute generation programmatically via the Apex Quickstart Guide[cite: 9]. Return to product overview: Salesforce Document Generation Guide[cite: 9].

Frequently Asked Questions

What do I need before I start configuring the EDocGen Salesforce package after installing it from AppExchange?

Before you start, have your EDocGen username and password ready from app.edocgen.com. If your organization needs a different server environment, contact EDocGen Support to get the correct URL and credentials. Then update the bundled Named Credential in Setup so Salesforce can authenticate to the EDocGen server. Completing these steps lets the Generate Document feature work properly across your Salesforce org.

How do I add a Generate Document button to Salesforce records?

You can add Generate Document to any object, such as Contract, Order, or Account. For single-record generation, open Object Manager, select the object, go to Buttons, Links, and Actions, and click New Action, then choose the Lightning Component action type. For bulk generation, create a List Button to use in list views. Use both options together if your team needs individual and multiple document creation.

Related Developer Documentation