Hi.
I have a business process with a file collection input parameter:
I am trying to run this process and pass the file collection to it inside a client module of a page, like so:
const selectedRowsfirstGrid = request.$context.DataGrid_264vdyg_SelectedRows.__zone_symbol__value;
const selectedRowsSecondGrid = request.$context.DataGrid_c581cyj_SelectedRows.__zone_symbol__value;
const ids = [...selectedRowsfirstGrid, ...selectedRowsSecondGrid];
const FilesIdCollection = [];
for(const fileId of ids) {
FilesIdCollection.push({ FileId: fileId });
}
const handlerChain = sdk.HandlerChainService.instance;
const result = await handlerChain.process({
type: "crt.RunBusinessProcessRequest",
processName: "QsProcess_Attach_files_to_the_email",
processParameters: {
FilesIdCollection: FilesIdCollection
},
$context: request.$context
});
I want to mention the fact that the code successfully runs the process if I omit the "processParameters" property, so that's most likely the cause of the error, but I just cannot find what's wrong with it. I looked at the names (code names, not display names), I searched the creatio community a bunch and I just cannot figure it out.
Edit: I tried the same code but passed a Guid parameter instead, with a randomly generated Guid and it all works smoothly; the problem seems to be that the collection I am creating is not compatible with the File Collection type from the business process, but how do I make them compatible?
Thank you in advance for your help!
Laurentiu