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

CAD question - debugging client-side script

MayankGupta77
Tera Contributor

Hello everyone, 

Recently, I was preparing for CAD exam and during one of the mock tests, I got doubt in one question:

 

Which option are strategies for debugging client-side scripts?

a. gs.addErrorMessage()

b. gs.log()

c. jslog()

d. g_form.addInfoMessage()

which two options are correct? 

2 ACCEPTED SOLUTIONS

M Iftikhar
Giga Sage

Hi @MayankGupta77 ,

 

c. jslog() and d. g_form.addInfoMessage() are the correct options.

 

 jslog()

Sends log messages to the browser console

 

g_form.addInfoMessage()

Displays an informational message on the form Client-side (GlideForm API)

 

If my response helped, please mark it as the accepted solution so others can benefit as well. 

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.

View solution in original post

Nawal Singh
Giga Guru

Hi @MayankGupta77 ,

Option C,D are correct

 

1. If you want to execute jslog() here is the example (Press----ctrl+shift+J)-

NawalSingh_0-1759999306557.png

2. if you want to test gs.addInfoMessage(); here is the example-

NawalSingh_1-1759999390503.png

 

If you found my response helpful, please mark it as helpful and accept it as the solution.

Thank you
Nawal Singh

View solution in original post

3 REPLIES 3

M Iftikhar
Giga Sage

Hi @MayankGupta77 ,

 

c. jslog() and d. g_form.addInfoMessage() are the correct options.

 

 jslog()

Sends log messages to the browser console

 

g_form.addInfoMessage()

Displays an informational message on the form Client-side (GlideForm API)

 

If my response helped, please mark it as the accepted solution so others can benefit as well. 

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.

Nawal Singh
Giga Guru

Hi @MayankGupta77 ,

Option C,D are correct

 

1. If you want to execute jslog() here is the example (Press----ctrl+shift+J)-

NawalSingh_0-1759999306557.png

2. if you want to test gs.addInfoMessage(); here is the example-

NawalSingh_1-1759999390503.png

 

If you found my response helpful, please mark it as helpful and accept it as the solution.

Thank you
Nawal Singh

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @MayankGupta77 

 

c. jslog()

d. g_form.addInfoMessage()

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************