Commit Graph

10 Commits

Author SHA1 Message Date
Paul Huliganga 61446bde23 Fix email subject truncation to 100 chars
- Add truncation to existing working email subject logic (combined template names)
- Subject is truncated to 100 characters max with '...' suffix when needed
- Add test case for truncation with multiple templates
- Preserves existing behavior: subject = combined template names, body = concatenated email messages
2026-03-03 18:55:18 -05:00
Paul Huliganga 32369c5939 Fix email subject to use combined template Short Names
- Query Short_Name__c field from dfsle__EnvelopeConfiguration__c
- Use short names for email subject (fallback to full names if blank)
- Custom emailSubject still overrides if provided
- Always truncate subject to 100 characters max
- Fixes issue where selecting all templates created too-long subject
2026-03-03 18:51:42 -05:00
Paul Huliganga 90c65ea2c6 Fix email subject truncation to 100 chars
- Truncate req.emailSubject to 100 characters max as required by Docusign
- Add '...' suffix when truncating long subjects
- Add test case for subject truncation validation
- Fixes error: 'email subject must be no greater than 100 characters'
2026-03-03 18:38:00 -05:00
Paul Huliganga 9a8cde3735 Fix email subject truncation to 100 chars
- Truncate envelopeSubject to 100 characters max as required by Docusign
- Add '...' suffix when truncating long subjects
- Add test case for subject truncation validation
- Fixes error: 'email subject must be no greater than 100 characters'
2026-03-03 17:40:47 -05:00
Paul Huliganga 95abbdbabd Revert "Fix email subject truncation to 100 chars"
This reverts commit 458d8f21a4.
2026-03-03 17:40:34 -05:00
Paul Huliganga 458d8f21a4 Fix email subject truncation to 100 chars
- Truncate envelopeSubject to 100 characters max as required by Docusign
- Add '...' suffix when truncating long subjects
- Add test case for subject truncation validation
- Fixes error: 'email subject must be no greater than 100 characters'
2026-03-03 17:24:36 -05:00
Paul Huliganga 4b1edd4d27 refactor: switch to dfsle Apex Toolkit - remove raw API code
BREAKING CHANGE: Now uses dfsle managed package for Docusign integration.
No separate credentials or Named Credentials needed.

Changes:
- Rewrote DocusignCompositeEnvelopeBuilder to use dfsle.EnvelopeService
  and dfsle.Document.fromTemplate() for composite envelopes
- Simplified DocusignEnvelopeRequestHandler to validation-only
- Updated all tests to use dfsle.TestUtils.setMock()
- 12 comprehensive test methods (success, validation, edge cases)

Deleted (no longer needed):
- DocusignAPIService.cls (raw HTTP callouts)
- DocusignAPIServiceTest.cls
- DocusignCredentials.cls (custom settings)
- DocusignCredentialsTest.cls

Benefits:
- Uses existing dfsle package authentication automatically
- No Named Credential or Custom Setting setup required
- ~95 lines of code vs ~380 lines before
- Fully supported by Docusign managed package
2026-02-25 11:29:38 -05:00
Paul Huliganga 7df62e06ca refactor: extract Request and Result as standalone global classes
- Created DocusignEnvelopeRequest.cls (separate global class for input)
- Created DocusignEnvelopeResult.cls (separate global class for output)
- Updated DocusignCompositeEnvelopeBuilder to use standalone classes
- Updated DocusignEnvelopeRequestHandler to reference standalone classes
- Updated all test classes to use new class references
- Fixes Flow Builder visibility issues with nested inner classes
- Better API design with clear input/output types
- Easier to extend and reuse across other classes
2026-02-25 10:05:36 -05:00
Paul Huliganga b00a930e8d fix: remove duplicate JSON builder test from main class
- Removed testJSONBuilder from DocusignCompositeEnvelopeBuilderTest
- JSON building logic tests now handled by DocusignEnvelopeRequestHandlerTest (10 comprehensive tests)
- Fixes deployment error: method buildCompositeEnvelopeJSON no longer exists in main class
- Eliminates code duplication between test classes
2026-02-25 09:39:18 -05:00
Paul Huliganga 4f734f0d17 Initial commit: Salesforce Composite Envelope Builder 2026-02-25 09:22:29 -05:00