Refresh grid with data from recorType after record deletion
Hi all,
Here are my needs:
I have a grid of records with checkboxes and a button. I woud like to delete selected records and refresh the grid.
Deletion works good. Refresh does not work.
I read alreqy these 3 posts with problems similas to mine, without finding a solution:
- https://community.appian.com/discussions/f/data/25926/how-to-refresh-a-recordtype-after-the-end-of-a-process
- https://community.appian.com/discussions/f/data/25694/record-refresh-after-record-action
- https://community.appian.com/discussions/f/new-to-appian/25654/page-refresh-or-redirect-on-after-button-press/100298#100298
What i did so far is to create a read only grid. Data are retriven from a recordType, relying directly from the DS.
Clicking on checkboxes stores record ids on a local variable.
The button invokes a PM who does other operations before deleting checked records from DS.
All branches in PM are chained up to the delete step.
here the button:
a!buttonWidget(
label: "Delete",
icon: "trash",
saveInto: {
a!startProcess(
processModel: cons!PM_deleteRequests,
processParameters: {
requestsToBeDeleted: local!selectedRequests
},
onSuccess: {
a!save(local!succes, local!succes + 1),
a!save(local!selectedRequests, null())
},
onError: a!save(local!error, true())
)
Here are the parameters:
selectable: true,
selectionStyle: "CHECKBOX",
selectionValue: local!selectedRequests,
selectionSaveInto: local!selectedRequests,
validations: {},
spacing: "DENSE",
height: "AUTO",
borderStyle: "STANDARD",
refreshAlways: false,
refreshAfter: "RECORD_ACTION",
refreshOnVarChange: local!succes,
/* I tried these last 3 param each one alone and in combination*/
showSearchBox: false,
showRefreshButton: false,
recordActions: {}
)
here how a field in the grid is invoked:
a!gridColumn(
label: "Document Title",
sortField: 'recordType!Request.fields.{documentTitle}documentTitle',
value: fv!row['recordType!Request.fields.{documentTitle}documentTitle'],
align: "START"
),
Any hint/help is welcome
Thanks A lot
Ale
