Hi Jean,
Your current version should also allow you to rename the attachment and remove the default GUID.
You can add a new parameter to AddAttachment(dataURL, [name, [createHash : bool]]); the default for createHash is true. You can now pass in false to prevent a hash from being created in the name.
This is one example where I performed a few tests using different setting combinations:
function DoAddAttachmentsTest(five, context, result) {
const reportResult = five.executeAction('StaffExtension', {});
if (reportResult.isOk() === false) {
return five.createError(reportResult);
}
if (reportResult.report) {
five.addAttachment(five.toDataURL('application/pdf', reportResult.report),
'Roster-' + 'roterGroupName',
false
);
}
const reportResult1 = five.executeAction('WebProductsReport', {});
if (reportResult1.isOk() === false) {
return five.createError(reportResult1);
}
}
if (reportResult1.report) {
five.addAttachment(five.toDataURL('application/pdf', reportResult1.report),
'Roster-' + 'WebProductsReport',
true
);
}
return five.success(result);