- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-15-2022 11:25 PM
This is my code:
function onLoad() {
//Type appropriate comment here, and begin script below
var msg = parent.g_form.getValue('messenger_service');
if (m.toString() == 'true') {
g_form.setValue('vs_account_otf', '');
}
var fold = parent.g_form.getValue('folding');
if (fold.toString() == 'true') {
g_form.setValue('vs_account_otf', '');
}
var ps = parent.g_form.getValue('postage_stamps');
if (ps.toString() == 'true') {
g_form.setValue('vs_account_otf', '');
}
var insert = parent.g_form.getValue('inserting');
if (insert.toString() == 'true') {
g_form.setValue('vs_account_otf', '');
}
var label = parent.g_form.getValue('labeling');
if (label.toString() == 'true') {
g_form.setValue('vs_account_otf', '');
}
var tab = parent.g_form.getValue('tabbing');
if (tab.toString() == 'true') {
g_form.setValue('vs_account_otf', '');
}
var other = parent.g_form.getValue('other');
if (other.toString() == 'true') {
g_form.setValue('vs_account_otf', '');
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-16-2022 12:10 AM
I done it myself instead of using parent.g_form.getValue use g_service_catalog.parent.getValue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-15-2022 11:39 PM
Hi @Community Alums ,
At the time of form load all those variables are pre-filled ?
messager service , folding ,postage stamp etc?
Because it is onload script.parent. g_form is UNDEFINED from the onLoad() event of MRVS; therefore no getValue() function may be called on it.
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-16-2022 12:10 AM
I done it myself instead of using parent.g_form.getValue use g_service_catalog.parent.getValue