33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
Appraiser_Case__c appraiserCase = new Appraiser_Case__c(
|
|
Appraiser_Field_Review_Date__c = Date.today(),
|
|
Property_Street__c = '123 Main St',
|
|
Property_City__c = 'Ottawa',
|
|
Property_State_Province__c = 'ON',
|
|
Property_Postal_Code__c = 'K1A 0A1',
|
|
Property_Country__c = 'Canada'
|
|
);
|
|
insert appraiserCase;
|
|
|
|
insert new List<Appraiser_Deficiency__c>{
|
|
new Appraiser_Deficiency__c(
|
|
Name = 'Deficiency 1',
|
|
Appraiser_Case__c = appraiserCase.Id,
|
|
Deficiency_Number__c = '1',
|
|
Description__c = 'Missing comparable sale analysis',
|
|
Resolution__c = 'Provide updated comparable sales section',
|
|
Sort_Order__c = 1
|
|
),
|
|
new Appraiser_Deficiency__c(
|
|
Name = 'Deficiency 2',
|
|
Appraiser_Case__c = appraiserCase.Id,
|
|
Deficiency_Number__c = '2',
|
|
Description__c = 'Exterior condition comments are too brief',
|
|
Resolution__c = 'Expand comments and attach photos',
|
|
Sort_Order__c = 2
|
|
)
|
|
};
|
|
|
|
System.debug('Created Appraiser Case Id: ' + appraiserCase.Id);
|
|
System.debug('Payload JSON: ' + AppraiserCaseDocGenService.buildPayloadJson(appraiserCase.Id));
|
|
System.debug('Doc Gen JSON: ' + AppraiserCaseDocGenService.buildDocGenRequestJson(appraiserCase.Id, 'APPRAISER_REVIEW_LETTER'));
|