Uncaught ReferenceError: is not defined at HTMLButtonElement.onclick

sadiq
Tera Contributor

Hello guys I am trying to download the pdf format but unknowingly I get this error as Uncaught ReferenceError:

downloadIncident() is not defined at HTMLButtonElement.onclick 

did anyone face this issue while working on UI pages?
1 ACCEPTED SOLUTION

HI @sadiq ,

I tried this code as is and it is working fine for me, no issue with code in my PDI. Please try this once in your PDI, if it is working in PDI, may be your organization instance is blocking some external scripts.

 

AnveshKumarM_0-1695295360869.png

 

Thanks,
Anvesh

View solution in original post

8 REPLIES 8

can you explain what have you done or which browser are you using?

@sadiq I Just created a UI Page and copied the HTML and Client Script as is, then created a Client callable Script Include and copied the code as is here too.

 

Opened the UI page and entered an Incident and clicked on download it downloaded a PDF.

 

Thanks,
Anvesh

Yes it worked for me too. it looks like there is some problem with the UI action I created. Thanks for acknowledging!

@sadiq Can you please accept my answer as solution and mark it helpful 👍✔️

Thanks,
Anvesh