Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

I want to disable or make add button non clickable on multi-row variable set catalog form.

Harshal Sonawa1
Kilo Guru

Screenshot 2023-07-05 at 10.57.08 AM.png

1 ACCEPTED SOLUTION

Harshal Sonawa1
Kilo Guru

I was able to achieve this with onLoad catalog client script.

var disableAddButton = g_form.getField("variable_set_name");
disableAddButton.max_rows_size = 0; // 0 number indicates you can not add entries in mrvs. If 1, than you can add 1 entry in mrvs with help of add button after than add button will be disable

View solution in original post

3 REPLIES 3

Harshal Sonawa1
Kilo Guru

I was able to achieve this with onLoad catalog client script.

var disableAddButton = g_form.getField("variable_set_name");
disableAddButton.max_rows_size = 0; // 0 number indicates you can not add entries in mrvs. If 1, than you can add 1 entry in mrvs with help of add button after than add button will be disable

Hemanth M1
Giga Sage

Hi @Harshal Sonawa1 ,

 

Please refer this detailed article from asifnoor  :https://www.servicenow.com/community/developer-articles/disable-buttons-in-multirow-variable-set/ta-... 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Thank You. I found the answer