Dear colleagues,
In a Freedom ListPage, I need to process all the records that a user selects AND REPORT THE RESULTS AT THE END.
I'm having trouble figuring out how to approach this task. Currently, as I understand it, we call a process with the ID of the record to be processed.
Is there a way to know when all the selected records have been processed and know which ones?
I'm trying to implement a temporary table to insert the IDs of the selected records, but for this, I need to have a unique ID in that temporary table so that if there are multiple users doing the same thing, the current user's records are not mixed up. To do this, I've edited the code of the page where the service call is made to pass a second parameter to the process, an ID that I need to generate, but the generated ID is always the same "00000000-0000-0000-0000-000000000000":
"parameterMappings": {
"NotaCreditoID": "Id",
"ProcesoID": Terrasoft.utils.generateGUID()
},
What am I doing wrong with this approach?
Here is an excerpt of the modified code:
define("NdosNotasCredyDeb_ListPage", /**SCHEMA_DEPS*/["@creatio-devkit/common"]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/(sdk)/**SCHEMA_ARGS*/ {
"operation": "insert",
"name": "Button_ft2cncy",
"values": {
"type": "crt.Button",
"caption": "#ResourceString(Button_ft2cncy_caption)#",
"color": "default",
"disabled": false,
"size": "large",
"iconPosition": "only-text",
"visible": true,
"clicked": {
"request": "crt.RunBusinessProcessRequest",
"params": {
"processName": "NdosLiberaDescartaNC_CC",
"processRunType": "ForTheSelectedRecords",
"showNotification": true,
"dataSourceName": "PDS",
"parameterMappings": {
"NotaCreditoID": "Id",
"ProcesoID": Terrasoft.utils.generateGUID()
},
"filters": "$Items | crt.ToCollectionFilters : 'Items' : $DataTable_SelectionState | crt.SkipIfSelectionEmpty : $DataTable_SelectionState",
"sorting": "$ItemsSorting",
"selectionStateAttributeName": "DataTable_SelectionState"
}
},
"clickMode": "default"
},
On the other hand, has anyone done this in any other way? How?
Thank you very much
Julio