Approve button not working on risk response task table

prajwalchou
Tera Contributor

Hey there, 

I was working on GRC module and noticed that the "Approve" UI action does not work as intended in workspace. It works perfectly fine in native UI, but in workspace if you try to click the button, nothing happens.

Later I found that in workspace client script of Approve button they are using g_form.submit() and in the very next line there's this code location.reload(). When I commented location.reload(), the button worked but did not reload. But I want it to reload as well. 

Below is a screenshot of the UI action code.

 

prajwalchou_0-1739806695885.png

 

3 REPLIES 3

Craig Gruwell
Mega Sage

Hi @prajwalchou,

 

In my PDI, upon approving, I'm seeing it reload and the approval record is actually approved but the state (within the form header on workspace) is not updating.   If I check the status of the approval, it shows as approved.  If I refresh again, the state in the header is updated to Closed Complete.  It seems to be a timing issue.  Is this the issue you are seeing?

 

In my case, the approval isn't getting approved since we have location.reload() in the script. However when I comment that code, the approval is approved but there's nothing happening on the screen and they end up clicking it again which throws an error.

 

With the location.reload() in the script, are you getting any errors in the browser console?  

 

Are you able to reproduce that behavior in a PDI?