RetrieveQueries Method
Retrieves queries from the user group.
Syntax
sapquery.retrieveQueries([callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This will use the WorkSpace, QueryName, and UserGroup to retrieve any queries that meet the criteria.
So you can do something like this:
SapQuery1.WorkSpace = SapqueryWorkSpaces.wsGlobalArea; SapQuery1.QueryName = "*"; SapQuery1.UserGroup = "/SAP*"; SapQuery1.RetrieveQueries();This will then QueryMetaDatas with any query available in the Global Area workspace the user groups that begin with "/SAP" have access to.