Show message in the portal

JLeong
Mega Sage

Hi Guys,

I can't seem to show a message under a reference field in the portal. I have tried the following

  • g_form.showFieldMsg
  • g_form.showErrorbox
  • Macro

It works in the core UI :

find_real_file.png

but not in the portal:

find_real_file.png

 

Here is the code:

find_real_file.png

Thank you in advance.

 

Regards,

Jocelyn

 

1 ACCEPTED SOLUTION

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi,

Is the UI Type" set to "All" on the client script? If not, the script won't get executed on Service Portal.

find_real_file.png

View solution in original post

6 REPLIES 6

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi,

Is the UI Type" set to "All" on the client script? If not, the script won't get executed on Service Portal.

find_real_file.png

UI Type on the Client Script page. I've tested using the following and the field message showed properly. The code in the question looks alright too so should show a message if the script is executed.

find_real_file.png

JLeong
Mega Sage

Thanks, Hitoshi, so it worked for that one but not for this:

Could you spot an issue?

 

find_real_file.png

Anil Lande
Kilo Patron

Hi,

Please check the Client scripts UI type as suggested by @Hitoshi Ozawa, it should be All.

Also I see you have posted a callback function script. Can you please put an alert in your callback function at the beginning to check whether it is going inside callback function or not.

Please share complete script so that we can suggest what is wrong with your script. Are you using GlideAjax with getXMLWait()? 

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande