- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2022 12:35 AM
Hello,
gr.addQuery("incident', Current.sys_id); what is mean of this line?
addQuery() we used to queried perticuler field or perticuler table also?
Thanks & Regards
Shraddha Desai
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2022 01:48 AM
Hi
now it makes sense. The variable current holds a GlideRecord reference to a record in the incident table (I suppose that code is from a business rule on the incident table, right?).
The given code queries all records from incident_task table which have a reference specified in the "incident" field and thus pointing to the current incident record.
Add with the help of the additional query conditions the result set is narrowed down to all actice incident_task records which have not a "state" value of "8".
Does this help?
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2022 12:57 AM
Hi
unfortunately you did not provide more context, and so I only can assume that "incident" is really a field name at the table given by the variable "current".
If "incident" is not a field name, then this code line is not correct.
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2022 01:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2022 01:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2022 01:48 AM
Hi
now it makes sense. The variable current holds a GlideRecord reference to a record in the incident table (I suppose that code is from a business rule on the incident table, right?).
The given code queries all records from incident_task table which have a reference specified in the "incident" field and thus pointing to the current incident record.
Add with the help of the additional query conditions the result set is narrowed down to all actice incident_task records which have not a "state" value of "8".
Does this help?
Kind regards
Maik