‎02-03-2017 10:48 AM
Hi Team ,
Catalog Client scripts is not working in Service portal any suggestion?
I have gone trough some community threads , i changed type to BOTH but no luck.
It is not hiding fields . Any suggestions..or idea ..
NOTE: We have upgraded from Geneva to Helsinki. We are facing issue in Helsinki (service portal), in CMS same code is working fine.
my code is:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var impact = g_form.getValue('inc_impact');
if (impact == 'yes') {
g_form.setDisplay('short_description', false);
g_form.setMandatory('messaging_tool', false);
g_form.setDisplay('messaging_tool', false);
g_form.setMandatory('urgency', false);
g_form.setDisplay('urgency', false);
$('manage_attachments').hide();
$('submit_now').hide();
}
else {
g_form.setMandatory('short_description', true);
g_form.setDisplay('short_description', true);
g_form.setMandatory('messaging_tool', false);
g_form.setDisplay('messaging_tool', false);
g_form.setDisplay('urgency', true);
g_form.setMandatory('urgency', true);
$('manage_attachments').show();
$('submit_now').show();
}
}
Thanks mates.
‎02-03-2017 10:54 AM
Can you check whether line 13 has g in your code?
Also Do you know which part of code is not running either if or else or both?
‎02-03-2017 10:58 AM
Hi dvp
Thanks for your reply.
just it is a typo mistake in original code g is there .
any suggestions..?
thanks
‎02-03-2017 11:20 AM
I'm guessing it not sure, can you swap mandatory and display statements in else part and try
g_form.setDisplay('short_description', true);
g_form.setMandatory('short_description', true);
‎02-06-2017 01:48 AM
It's not working dvp .