How can we edit the catalog item variable values after submission before approval?

prasanna11
Mega Guru

I have a requirement where approver must be able to tweak some values of request (variable values for that request) , before approving it. Is there a way to achieve it?

11 REPLIES 11

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Prasanna,



Have an onLoad catalog client script and make it run on RITM view


1) check whether the logged in user is approver for that current RITM


2) if yes then make few variables as readonly false since approver user wants to make some changes. the list of variables you must be knowing


3) if not then do nothing



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,



Thanks for the response. I am unable to make it editable by using setreadonly to false in catalog client script in ritm view.


I can use getvalue to get the value of the variable. but unable to use setreadonly. I also tried setDisabled method to false. That also didnt make the variable editable in the ritm form.


arnabwa
Giga Guru

Hi Prasanna,



What I would suggest is to have UI Action, a button named as "Refer Back" (or anything you want). This button will be placed on the sysapproval_approver form along with the Reject and Approve button. As the button "Refer Back" is clicked, it will take him to the Request form where the variables you want can be made editable for the approver. You can denote this stage in the request as well as in sysapproval form as "Review in Progress". He makes the changes and clicks on another customized button "Re Submit". The Re Submit button should appear and disappear according to the stage value. After re-submitting the request, the Request and associated task gets updated and the Reject and Approve button is again made available.



Please let me know if you have any doubts.



Thanks,


Arnab


Hi Arnab,



I understand what you are trying to say. But I dont think we have the variables in the request form do we? ,


find_real_file.png


In the related list it has only the corresponding RITM ,attachments TABs.



Can you help me understand more about that part of your answer?