The following interface displays a list of documents, on record summary page.
On each row of the grid there is a DELETE button which deletes a document record successfully however does not refresh the list of documents, only
by pressing the Summary button it is possible to refresh the list.
Please advise.
Thanks!
a!localVariables( local!deletedDocument, a!sectionLayout( label: "Document List ", contents: { a!gridField( label: "", labelPosition: "ABOVE", data: a!queryEntity( entity: cons!MCM_DSE_Document, query: a!query( logicalExpression: a!queryLogicalExpression( operator: "AND", filters: {a!queryFilter(field: "CaseID",operator: "=",value: ri!case.CaseID)}, ignoreFiltersWithEmptyValues: true ), pagingInfo: fv!pagingInfo ), fetchTotalCount: true ), columns: { a!gridColumn( value: a!buttonArrayLayout( buttons: { a!buttonWidget( label: "Delete", icon: "trash", value: fv!identifier, saveInto: { local!deletedDocument, a!deleteFromDataStoreEntities( dataToDelete: a!entityDataIdentifiers( entity: cons!MCM_DSE_Document, identifiers: { fv!identifier } ) ) }, size: "SMALL", style: "DESTRUCTIVE" ) } ) ), a!gridColumn( label: "Description", sortField: "Description", value: fv!row.Description, align: "START" ) } ) } ))
Discussion posts and replies are publicly visible
You might want to take a look at this page: https://docs.appian.com/suite/help/20.3/Local_Variables.html. The pattern Refresh Data after Executing a Smart Service, looks like it matches what you are trying to accomplish.
FYI, when posting any code like this (regardless of its length really) it'd be beneficial to use the Code Box ("Insert" --> "Insert Code") and paste your code there, as that retains formatting such as indentation, and keeps the post or comment from becoming unreadably long.