I have a smart action that calls a webservice that returns me a PDF type document, here is the code attached, how do I display the PDF that I retrieve in the bodyPDF variable?
collection.addAction('Get Search Contract', {
scope: 'Single',
async execute(context, resultBuilder) {
const record = await context.getRecord(['souscriptionExternalId']);
try {
const bodyPDF = await AuthApiService.searchContract(record.souscriptionExternalId);
return resultBuilder.success(`Successfully read Search Contract for souscription ${record.souscriptionExternalId}`);
} catch (error) {
return resultBuilder.error(`Failed to read Search Contract for souscription ${record.souscriptionExternalId}`);
}
},
});
Context
- Project name: PledgerMiddleV2
- Team name: Pledger
- Environment name: Recette
- Agent (forest package) name & version: 2 / typescript
- Database type: Postgres
- Recent changes made on your end if any: NA