Catalog Client Script: Interact with Catalog Item from a Multi-Row-Variable set

Jamsta1912
Tera Guru

Hi all,

I have a catalog client script that runs against a MRVS. It's setting a couple of variables on the parent item using parent.g_form.setValue. This works fine when users interact with the catalog item in the native UI, but it does not work in the Service Portal. I've found this promising looking post on this subject: https://www.servicenow.com/community/developer-articles/multi-row-variable-sets-how-to-get-or-set-va...

 

but the solution isn't working for me. I'm getting errors in the console: "TypeError: Cannot read properties of undefined (reading 'setValue')" so it's not recognising the cat_g_form object that's being defined in the onLoad client script. I'm working in Utah and it's a 'fairly' old post. I'm guessing something related to what's allowed with DOM manipultion may have changed in recent releases.

 

Can anyone advise, is there a definitive, tried and tested way to do this kind of thing, that works in both the native UI and the Service Portal?

 

Thank you

Jamie

2 REPLIES 2

-O-
Kilo Patron
Kilo Patron

Do you think you would get more answers if you would share what code you are actually using?

Anish Singh
Tera Expert

@Jamsta1912 Did you ever find a solution to this?