File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Server-Side Components/Script Includes/Get Already Associated Records Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ //Check if there is already record existing for a particular Issue to Item.
2+
3+ var getAlreadyAssociatedRecords = Class . create ( ) ;
4+ getAlreadyAssociatedRecords . prototype = Object . extendsObject ( global . AbstractAjaxProcessor , {
5+
6+ getSysIdsItem : function ( issueId ) {
7+
8+ var alreadyAssociatedContent = [ ] ;
9+ var gr = new GlideRecord ( 'sn_grc_m2m_issue_item' ) ;
10+ gr . addQuery ( 'sn_grc_issue' , issueId ) ;
11+ gr . query ( ) ;
12+
13+ while ( gr . next ( ) ) {
14+ if ( ! gr . sn_grc_item . nil ( ) )
15+ alreadyAssociatedContent . push ( gr . getValue ( 'sn_grc_item' ) . toString ( ) ) ;
16+ }
17+ return alreadyAssociatedContent . join ( ',' ) ;
18+
19+ } ,
20+
21+ type : 'getAlreadyAssociatedRecords'
22+ } ) ;
You can’t perform that action at this time.
0 commit comments