The CreatorCon Call for Content is officially open! Get started here.

Client script to add Alert() message to HRSD document task

SonaK
Tera Contributor

OnLoad Client script with just alert("TEST") on HRSD document task is not running when accessed from service portal whereas it works fine when I access the same document task in the desktop. I have defined UI type as "All" and tried turning Isolated scripts on and off as well. Nothing seem to work. Any idea what could be the reason. Please help.

6 REPLIES 6

Rob Sestito
Mega Sage

Hello @SonaK - 

It may help the community if you shared some screenshots of your form and the script you are using. That way, someone could possibly identify an error.

 

If you shared what you have, I could for example, duplicate it in my own dev instance and see if it works properly or not. And from there debug, adjust, etc.

 

Could you share your OnLoad Client Script form and the script you are using when trying to accomplish your task?

 

Thank you so much,

-Rob

Sandeep Rajput
Tera Patron
Tera Patron

@SonaK How are these document task shown on the Service Portal? Via a record producer? If yes then you need a Catalog client script for a record producer. The client script which is running fine on the platform/desktop view may not even trigger in case of service portal as the backend form is different than the record producer shown on the service portal. 

 

Hope this helps.

 

Hi. Thanks for your input. The task that I am working on to display an alert is a document task that is under to-dos list on employee portal configured as a widget. The task will open as a pdf document viewer. I am trying to see if I can add an alert without changing the widget (it looks like an OOB widget so I may need to clone and change just for an alert message). Please advise.

Thanks!

@SonaK If this is a widget then you need to put your alert inside the client controller of the widget.