save as draft functionality not working as expected in catalog item

sln
Tera Contributor

When a catalog request is saved as draft, on the draft record few conditionally dependent variables are hidden even when they are made visible on normal request form and few variable values are cleared. Please let me know if this can be solved without disturbing existing scripts.

14 REPLIES 14

Hi @tejaswinisa 

 

No mate, no solution for this 😞 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi @Dr Atul G- LNG , do you have any idea on how to achieve this by modifying the existing client scripts. Thanks.

Hi @sln 

No mate, the only solution I can think of is applying a client script on the field to display a message warning the user to avoid saving in draft. Otherwise, they’ll have to fill in the variable values again. It’s just a workaround.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@sln 

when the saved version is opened you can ensure your catalog UI policy or catalog client scripts doesn't run in that mode

It runs only in normal mode

In your onLoad client script you can check the browser URL contains edit=draft

if yes then don't run your client script -> this ensures your variables are intact

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@sln 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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