logo

NJP

How to ask script related queries in community while posting community questions

Import · Nov 13, 2021 · article

I have seen lot of user posting script related queries in plain text this will be very hard to analyze the syntax error of code you have posted in your questions.please follow the screenshots to create questions related to scripts in ServiceNow community.Image 1 with code editor

image

image

image

if you paste code in plain text this is how it will be visible after posting question

var gr =new GlideRecord('incident');

if you paste code in insert code as mentioned in above images.

var gr =new GlideRecord('incident');
gr.addActiveQuery();
gr.query();
if(gr.next){
var a =gr.getRowCount();
gs.addInfoMessage(a);

}

hope this helps with new users who are trying to post questions in communityThanks

Abhay

Labels:

image

View original source

https://www.servicenow.com/community/itsm-articles/how-to-ask-script-related-queries-in-community-while-posting/ta-p/2308091