LWC fixes:
- clmDocGenWorkbench: resetSelectionsToDefaults was a sync onclick handler
calling async initializeDefaults without await — isBusy not set and errors
silently dropped; made the method async and added await
- clmRequestPreview: loadPreview called from refreshAll (account/letter change
handlers) without a recordId guard; a null appraiserCaseId would propagate
to the Apex AuraHandledException; added early return with a user-facing message
manifest/package.xml:
- Was missing CLM_Account_Setting__mdt and CLM_Letter_Definition__mdt objects
and all 17 custom metadata records
- Missing DocusignESignatureService and its test class
- Missing docusignEsignWorkbench and clmRequestPreview LWC components
- Missing NamedCredential section entirely (CLMs1*, CLMuat*, Esignature_Demo)
- Missing CLM Account Setting and Letter Definition layouts
scripts/apex/createSampleAppraiserCase.apex:
- Rewrote entirely; old version referenced the deleted Appraiser_Deficiency__c
object, Sort_Order__c, Deficiency_Number__c as a string, and the deleted
AppraiserCaseDocGenService class
- Now uses Appraiser_Case_Deficiency__c with correct field types
- Populates all appraiser identity/address fields added since original version
- Debug output uses AppraiserCasePayloadBuilder and CLMDocGenCallout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SALESFORCE_SETUP.md:
- Rewrite "What was added" to cover all current fields, metadata types,
Apex classes, LWC components, named credentials, and permission sets
- Add DocusignESignatureServiceTest to the test run command
README.md:
- Replace absolute /home/paulh/... paths with relative ./FILE.md links
CLM_INTEGRATION.md:
- Pattern 1: replace wrong 3-arg trigger callout with correct Queueable pattern
(triggers cannot make direct callouts)
- Pattern 2: mark LWC quick action as implemented (no longer a recommendation)
- Pattern 3: update REST resource to use CLMAdminService.generateDocument signature
- Payload/request/response: replace old pre-XML format with current
documentxmlmergetasks JSON and XML structure
- Template design: replace Handlebars syntax with CLM XML merge description
NEXT_STEPS_DOCGEN.md:
- Mark Option B (LWC quick action) as complete
- Replace open-ended "what to confirm" with forward-looking guidance on
extending to NOD, Education, and Intent to Remove letter types
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New classes:
- CLMAdminService: UI-facing orchestration — account/letter settings from
metadata, document generation, task status polling, file attachment,
folder browsing; persists all CLM results to Appraiser_Case__c
- DocusignESignatureService: eSignature API browsing (accounts, templates,
envelopes, login info, user info)
- CLMAdminServiceTest, CLMDocGenCalloutTest, DocusignESignatureServiceTest
Updated classes (AppraiserCasePayloadBuilder, CLMDocGenCallout):
- CLMDocGenCallout: full XML merge callout stack, task status polling,
document download, recursive document href discovery, account-based
endpoint building; HTTP_TIMEOUT made public
- AppraiserCasePayloadBuilder: formatMailingAddress made public so
CLMAdminService can reuse it rather than duplicating the logic
Code review bug fixes:
- Fix null fields emitting literal "null" in generated XML — add safeValue()
helper; String.valueOf(null) returns "null" so escapeXml's null guard
never fired
- Fix unguarded inline SOQL in getCaseContext and getDocGenPreview — throws
QueryException for missing records instead of AuraHandledException; now
uses list query with isEmpty guard
- Remove duplicate formatAddress in CLMAdminService; delegate to
AppraiserCasePayloadBuilder.formatMailingAddress
- Replace hardcoded 30000 timeout in performGet with CLMDocGenCallout.HTTP_TIMEOUT
- Remove duplicate JSDoc on getTaskStatus
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaced by Appraiser_Case_Deficiency__c (master-detail, with Reference__c
field) and the XML-merge-based CLMDocGenCallout/CLMAdminService stack.
Also removes placeholder named credentials CLMNamedCred and CLMuatDownloadNamedCreds
superseded by the account-specific credential set.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>