Right click reject on approver list not working

Community Alums
Not applicable

Working through an issue we are having and I am stuck. On the approvers tab for our change requests we have the context menu available with the options of Approve and Reject to make it easier for approvers to approve/reject. When you right click and approve it works fine, but when you right click and select reject an error message of "Record not found" is thrown. If I am on my account (Admin) I can double click and select reject (not right click) and it works as intended and rejects the change. Any ideas of what might be going on? This changed when we went from Calgary to Fuji if that helps at all (We were a few releases behind). Screen shots below so you can see what I am referring to:

find_real_file.png

1 ACCEPTED SOLUTION

There is a problem with your action.setRedirectURL() in your ui action. According to the script it is looking for the current record in which state is rejected, but there is no record with state rejected.   Because the state of current record was still not set to rejected.  


Add these 2 lines before action.setRedirectURL()


current.state="rejected";


current.update();


//then here you copy your action.setRedirectURL() part


View solution in original post

19 REPLIES 19

I have noticed that the UI action you have in the snapshot is for change_request table, please find the UI action on Approval table and list context menu is true as shown in the snapshot.


find_real_file.png


Community Alums
Not applicable

Ok did some more digging, here is what I found for the sysapproval_approver UI action...



It seems that this one is the one that is in question as it is the one in the context menu list. I also tried added the others to the list and deactivating the others and testing them and they are all throwing the "record not found" error



find_real_file.png



Not sure if this makes a difference or not, but there are several reject UI actions for sysapproval_approver:



find_real_file.png



Here are screen shots of what the other two are:


find_real_file.png


find_real_file.png


Looks like you have customization. Which of these 3 have list context menu checkbox checked? Can you share the script of that UI action?


find_real_file.png


Community Alums
Not applicable

The very first one - if you click on the image it shows the full page, sorry I should have resized them.


There is a problem with your action.setRedirectURL() in your ui action. According to the script it is looking for the current record in which state is rejected, but there is no record with state rejected.   Because the state of current record was still not set to rejected.  


Add these 2 lines before action.setRedirectURL()


current.state="rejected";


current.update();


//then here you copy your action.setRedirectURL() part