Skip to Content
0
Jun 08, 2018 at 01:24 PM

serviceLayer: returnvalue from object query

130 Views Last edit Jun 13, 2018 at 07:29 AM 2 rev

Hi,

I use the following code to retrieve a userfield in the service layer.

var queryOption = "$select=TableName,FieldID&$filter=TableName eq '" + fieldData[i].TableName + "' and Name eq '" + fieldData[i].Name +
			"'";
console.log('queryOption: ' + queryOption);

var rs = slContext.UserFieldsMD.query(queryOption);
console.log('rs: ' + JSON.stringify(rs));

The syntax of the query options is good, but I don't know the format of rs.

JSON.stringify(rs) gives {}

How can I get the returned fields of how do I know nothing is returned.

Thanks

Ad