I have a Async Command Button that execute a method on server that remove a FileItem from a FileItem ArrayList. This button is on a row in my table that I created from my FileItem ArrayList.
Can you check if any function in the script block or in some client-side event code in the CAF code is getting invoked whenever you click the “button” here? That is causing this error to pop up looks like.
Action is getting invoked and the item is getting deleted already as you said. So somewhere the functions you wrote in a script in the view is causing this issue.
Let us know if you find something of that sort. I don’t see a problem with the action or button here though.
The on-client event is empty so the HTML generated code shows as - onclick=“”;
So not sure if the control parameter passing is linked to this error actually. I guess you are getting this error after AsyncTable refreshes.
Did you try in a different browser? Are you seeing the same issue there?
Can you try not to refresh the Asynctable and perform the delete once? See if you get the error still.
I believe this is a task detail page, so just open the task page again from TaskListManagement and see if the deleted file is gone.
If the issue is with the control parameter, then alternately try to pass the filename in the hidden variable via on client event for the button
In the refresh button property I removed the table ang I set “_none” on it. Then I test the button action and the current error doesnt appear! Then I verify if the deleted file has gone and it is.
If I can not refresh my table from the refresh button property, so what can I do for refreshing my table?
I hope you verified this by opening the task page again. The file was getting deleted but I was concerned about error only and to rule out any Java script error while clicking the button.
Refresh is like loading the provider again. So just check if any issues in the same once as there is a difference in provider data now, one with file and other without file. So still the deleted row/file is getting referred.
Also, put the table in the block panel and refresh that once and see.
I don’t have CAF set up to re-create this issue and test this. So I can propose certain options only. Sorry.