Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Catalog Client scripts is not working in Service portal any suggestion?

Nithin12
Tera Expert

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.    

find_real_file.png

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.

Developer CommunityDiscussUser Groups

nathanfirth

ctomasi

35 REPLIES 35

dvp
Mega Sage
Mega Sage

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?


Hi dvp


Thanks for your reply.


just it is a typo mistake in original code g is there   .


any suggestions..?




thanks


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);  



It's not working dvp .