How To find active & inactive Records in incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2017 01:34 PM
Below Mentioned Code not working.......why can i have calrification about this.
8.1 addActiveQuery
public QueryCondition addActiveQuery()
- Adds a filter to return active records.
- Returns:
- QueryCondition - filter to return active records.
- Example:
var inc = new GlideRecord('incident'); |
addInactiveQuery
public QueryCondition addInactiveQuery()
- Adds a filter to return inactive records.
- Returns:
- QueryCondition - records where the active flag is false.
- Example:
var inc = new GlideRecord('incident'); |
- 8,083 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2017 01:38 PM
Hi,
Can you provide some additional details on what you are trying to accomplish? Details (table names, catalog items, etc) are encouraged. Screen shots are always appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2017 03:52 AM
How to set Field values " script include to client side" when form Load
This question is Not Answered.(Mark as assumed answered)

D Kishore Mar 12, 2017 12:40 AM
Script Include :
var HelloWorld = Class.create();
HelloWorld .prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
Approve: function(a) {
return "The Server Says Hello " + this.getParameter('sysparm_user_name') + "!" ;
}
});
client Side OnLoad:
function onLoad() {
//Type appropriate comment here, and begin script below
var ga = new GlideAjax('HelloWorld');
ga.addParam('sysparm_name','Approve');
ga.addParam('sysparm_user_name',"Bob");
ga.getXMLWait();
alert(ga.getAnswer());
}
i would like to set values
state=3,category=software, short_description=''welcome to scripting" i want to write this code in script include and i would like to call that server code when i load a form in client side, this values should set into field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2017 06:40 AM
I'm not sure I completely understand the use case since it will set those values for every single incident on form load, but if that's what you want, the client script should do the trick (assuming state, category, and short description are all on the form.) No script include needed.
function onLoad() {
g_form.setValue('state', '3');
g_form.setValue('category', 'software');
g_form.setValue('short_description', 'welcome to scripting');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2017 01:40 PM
Please share more info. I can confirm code mentioned as per the wiki should work.
