I'm trying to delete using a delete action inside interface using a stored procedure because I also need to delete related data from other tables. However, I'm facing an issue: the entity is successfully deleted from the database, but it still appears in Appian.
I have a subprocess that runs after the stored procedure to sync all the updated tables, but the entity remains visible in Appian until I manually trigger a sync—after which it disappears as expected.
Does anyone have any idea what could be causing this issue? Any insights would be greatly appreciated!
here u can see the main subprocess sync :
and an example of one subprocess sync:
Discussion posts and replies are publicly visible
I understand your problem. If you're calling a stored procedure (SP) to delete data from a few tables in the database by clicking on the delete action in the interface, you need to refresh the data upon deleting the data in the database tables.
If you're using the a!executeStoredProcedureOnSave() function, it has an onSuccess attribute to save the response. I believe you're storing this response in a local variable, such as local!response.
a!executeStoredProcedureOnSave()
onSuccess
local!response
By using local!response, you can query the data again using refreshVariable to get refreshed data. The refreshVariable will refresh based on the local!response variable.
refreshVariable