Used by skuid.sfdc.search() to define the structure of a desired SOSL search.

PROPERTIES:

query (string): Required. The text to search for, e.g. “bacon”. Must be at least 2 characters.

returning (array of search.SObjectRequest objects): Required. Defines the Salesforce objects to search against, as well as optionally which fields to return on each object, how to order the returned records, how many records to retrieve per object, and how many records to offset the returned result set by.

searching (string): Optional, defaults to “NAME FIELDS”. The type of fields to search within. Must be one of the following: “ALL FIELDS”, “EMAIL FIELDS”, “PHONE FIELDS”, “NAME FIELDS”, “SIDEBAR FIELDS”.

fields (array of strings): Optional. The API Names of Fields to return for each record of this SObject that was returned by the search query. For example, [“FirstName”,”LastName”,”Birthdate”,”Account.Name”,”MyCustomField__c”]

conditions (array of skuid.Model.Condition objects): Optional. A list of Conditions to use to restrict which matching records are returned by the search query for this object. Used to define the WHERE clause for the generated search query for this SObject. For example, [ new skuid.model.Condition({ field: “IsActive”, value: true, operator: “=”, encloseValueInQuotes: false }) ]

conditionLogic (string): Optional. String of logic defining how to apply any Conditions defined in the conditions property, e.g. “1 AND (2 OR 3)”

orderBy (string): Optional. A valid SOQL Order By clause defining how to order the results returned by the search query for this SObject. For example, “LastName, FirstName”, or “acme__Position__r.Name DESC NULLS LAST”.

recordsLimit (integer): Optional. The maximum number of matching result records to retrieve for this SObject, e.g. 20, 100.

recordsOffset (integer): Optional. Used to specify the starting row offset into the result set returned by your query. For instance, if 13 total records of this SObject type are matched by your SOSL search query, and recordsOffset is set to 13, then results 11-13 would be returned (for a total of 3 records).

request (search.Request object): The original search request object that produced this search result.

results (array of search.SObjectResult objects): The results of the SOSL search, for each requested SObject. For instance, if there were two search.SObjectRequest objects specified in the search.Request’s returning property, then there will be two search.SObjectResult objects returned here. NOTE: this will be undefined if there was an error with the SOSL search.

error (string): A text description of any error that occurred with the SOSL search. Only populated if there was an error with the SOSL search, otherwise it will be undefined.

Used by the search.Result object to return the results of a SOSL search for each requested SObject.

PROPERTIES:

objectName (string): The API Name of the SObject, e.g. “Account”, “Candidate__c”, “acme__Position__c”

records (array of SObject record objects): The SObject records that matched the search query, returned as JavaScript objects containing as properties / fields only those fields specifically requested in the fields property of the search.SObjectRequest.