Skip to main content

recordCount()

Last updated 5/02/2024

Example

The code checks if we get a single record count back, otherwise returns an error indicating the request is invalid.

JavaScript
Checks if we get a single record count back
    let queryResults = five.executeQuery('SELECT SubmissionKey, ContactEmails FROM Submission WHERE SubmissionKey = ? AND Status = "NR"', 0, submissionKey); 
if (queryResults.recordCount() !== 1) {
return five.success(result, 'Request is invalid');
}