Skip to main content
julienc
February 6, 2024
Question

Hide record action immediatly after click

  • February 6, 2024
  • 3 replies
  • 0 views

Hello there!

I have a related action on my records which are displayed in a grid.

Is it possible to hide the icon starting the action immediately after the user clicks on it?

Otherwise there are users who do multiple clicks, and since my action deletes the same record, they end up with a sad

An error occurred while applying the context for the [myRecordName] related action [identifier=12,086]. Details: The record data does not exist, has been deleted, or you do not have sufficient privileges to access it.

In fact, the record disappears from the grid quickly after the click, but not immediately, and sometimes user can click again.

The record action is a related record action, configured to be call the deletion process as follows:

{
  idRecord: rv!record[[myRecordName.id]],
  cancel: false()
}

Part of the code:

      a!gridField(
        labelPosition: "ABOVE",
        refreshInterval: 1,

data: a!recordData([...]),

columns: {
[...]

            a!gridColumn(
              label: "",
              value: a!recordActionField(
                actions: {
                  a!recordActionItem(
                    action: [myRecordName.actions.deleteTheRecord],
                    identifier: fv!row[[myRecordName.id]]
                  )
                },
                display: "ICON",
                style: "CALL_TO_ACTION"
              ),
              align: "CENTER"
            )
          },
          refreshAfter: "RECORD_ACTION",
          showSearchBox: true,
          showRefreshButton: true,
          showExportButton: true,
          actionsDisplay: "ICON",
          actionsStyle: "TOOLBAR"

)

In place of changing my users, what would be a possible solution?

3 replies

konduruc733182
February 6, 2024

Hello [mention:0b716977d4584b43829e30e4bc418007:e9ed411860ed4f2ba0265705b8793d05] 

You will either have to have a column where you mark the task or action value to true or completed as soon as the process is triggered.
To avoid these type of situations you will have to have a task approach, that would resolve the issue. 

julienc
juliencAuthor
February 6, 2024

Not helpful, thank you anyway ;)

harshitb6843
February 6, 2024

Appian takes some time to process as it is a web app running on a web-server. I assume that you do not have any UIT in your process and no interface loads up when you click on the action. But still, Appian needs to do processing behind the scenes to pass the parameter in the Process, start the process, and create logs. So the straight forward answer to your question is, no you can't do it the second they click on it. 

[mention:0b716977d4584b43829e30e4bc418007:e9ed411860ed4f2ba0265705b8793d05] Instead what you can do is replace the recordActions with the buttonWidget and call a!startProcess in their saveInto. On buttons, you do have an option to show loading indicator so it becomes un-clickable when a processing is happening behind the scene.