I have a record type called "Case", and it has a field called "assignee".
I also have an interface, in the interface, I have
To do so, I created:
In the interface, I declared:
the button widget implementation of "Assign Selected Cases in Batch" is
a!buttonWidget( label: "Assign Selected Cases in Batch", saveInto: { a!startProcess( processModel: cons!PDVAL_PM_CASE_ASSIGNMENT, processParameters: { assignedGroup: null, /* Group */ assignee: local!assignee, /* User */ availableAssignees: local!availableAssignees, /* List of User or Group */ processAction: a!match( value: local!availableAssigneeGroup, equals: cons!PDVAL_GROUP_PREPARER, then: cons!PDVAL_TEXT_PROCESS_ACTION_PREPARER_REASSIGN, equals: cons!PDVAL_GROUP_REVIEWER, then: cons!PDVAL_TEXT_PROCESS_ACTION_REVIEWER_REASSIGN, default: null ), cases: local!selectedCases/* PDVAL Case */ }, onSuccess: { a!save( local!caseDataRefreshCounter, local!caseDataRefreshCounter + 1 ), } ) }, submit: false, validate: false }
What I expected:
However, it is not the case, it does not refresh the data at all, user has to manually refresh the page to get the latest data
Discussion posts and replies are publicly visible
I have 2 questions:
1. Is your process model chained? Does the counter get incremented after the button is clicked?
2. Is there a particular reason why you are not putting the recordData (and refresh) on the grid directly instead of a separate local variable?
This is an example I did for another question
I am not sure why this even works at all. In my understanding, a!recordData only works inside the grid, but not for local variables. We just had this conversation here the other day.
Sorry I did not even notice there is a refreshOnVarChange attribute under gridField, that is my problem. Btw, local variable of recordData does work in terms of data attribute in gridField.
The solution for my problem is to set refreshOnVarChange under gridField instead of creating a refreshing variable and set refreshOnVarChange
If you found an answer helpful, please consider marking it as verified.
thanks for the reminder, I have it done