MRVS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2026 12:11 AM - edited ‎02-17-2026 12:12 AM
I cloned the out-of-the-box widget to capture MRVS values when a request is submitted. However, the values entered by the user are not being captured on submission, and the custom portal throws an error.
If I switch back to the OOTB widget record, it works correctly. But when I use the cloned custom widget, the error occurs and the MRVS values are not captured.
Will MRVS work properly in a custom scoped application?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2026 12:26 AM
Hi @HARSHA GOWDA R ,
The error Cannot call property size in object... It is not a function, it is "number" is the smoking gun. In the ServiceNow Global scope, certain objects use .size() (a function), but in a Scoped Application, those same objects often use .size (a property) or .getSize().
The Fix
In your cloned widget's Server Script, look at Line 170. You need to change the way you check the size of the choiceListQuantity object.
Change this: for (var i = 0; i < choiceListQuantity.size(); i++) {
To this: for (var i = 0; i < choiceListQuantity.size; i++) {
If this works, Please Mark it as helpful and please Accept My Solution..
Best Regards,
SIVASANKARI S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2026 12:28 AM
Hi @sivasankaris
I already tried changing size() to size but its not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2026 12:27 AM - edited ‎02-17-2026 12:28 AM
Check this thread: You have to do several changes as per the post:
1. choiceListQuantity.size instead of choiceListQuantity.size()
2.choiceListQuantity.getChoice(i) instead of choiceListQuantity.get(i)
3. (isFinite(choice.getValue())) instead of (!isNaN(choice.getValue()))
4. lines 195 to 198:
data.sc_cat_item = $sp.getCatalogItem({
sys_id: data.sys_id + '',
is_ordering: true
});
Replace it with data.sc_cat_item = $sp.getCatalogItem(data.sys_id);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2026 12:36 AM
what's your requirement here?
why you did cloning?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
