Refresh grid with data from recorType after record deletion

Certified Lead Developer

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:

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

  Discussion posts and replies are publicly visible