Unable to run an onLoad catalog client script on RITM when using portal

MikeB3
Tera Contributor

 

We need to run a script when a portal user opens a RITM created for a specific catalog item.

We've created a catalog client script with the following settings:

  • UI Type: All
  • Applies on Requested Items: True

However, the client script doesn't run when opening the RITM from the portal. It works fine when running on the RITM in the platform and when tested on the catalog item view.

For testing, I stripped the script down to:

 

javascript
Copy code
g_form.addInfoMessage('test'); console.log('test');
 

Does anyone know how to run an onLoad client script on a RITM when it's opened in the portal?

7 REPLIES 7

Anurag Tripathi
Mega Patron
Mega Patron

HI Mike,

Just use an alert in the script and see if that works.

Can you show a screenshot of your script. whole page including script

 

-Anurag

MikeB3_0-1721212285223.png

 

Abhishek_Thakur
Mega Sage

Hello @MikeB3 ,

 

Try to use the UI type specifically for portal and use alert instead of console.

If possible also share the screenshot of your code.

I tried that but it didn't work