Good to know it is working. Be sure to mark it as correct so that others with a similar issue can find the answer quickly.



Let me walk through each line of code in the function of the script include:


              var grpID = this.getParameter('sysparm_grp'); //This is the parameter passed from the Client Script


              var usrID = this.getParameter('sysparm_usr'); //This is the parameter passed from the Client Script


              var memObj = new GlideRecord('sys_user_grmember'); //initializes a GlideRecord object on the Group Membership [sys_user_grmember] table


              var qString = 'group=' + grpID + '^user=' + usrID; //Builds a query string to find the group and user in the Group Membership table.


              memObj.addEncodedQuery(qString); //Adds the query string using the addEncodedQuery() method


              memObj.query(); //Runs the query


              return memObj.hasNext(); //uses the hasNext() method to indicate if the query has any found records.



Some helpful documents to refer to:


GlideRecord - Global


GlideRecord - Scoped


AJAX