getItemsByParamArray(ArrayOfParams, ArrayOfSortCriteria)

Returns an array of items that can be iterated.

Required Editions

Available in: Lightning Experience in Professional, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled.

Parameters

  • ArrayOfParams: An array of JSON structures that indicate the simple properties to be selected and the operator. For example: { SimpleProperty1 : Value1, "op" :Operator },{ SimpleProperty12: Value2, "op" : Operator }]

    Operator is optional and can be:

    • EQ: equal
    • GT: Greater than
    • LT: Lower than
    • GE: Greater or equal
    • LE: Lower or equal
    • NE: Not equal

    If no operator is entered, the default—equal—is used.

  • ArrayOfSortCriteria: An array of JSON structures that indicate the sort criteria. For example: {SimplePropertyN : SortDirection}]. The sort direction can be:
    • ASC: Ascendent
    • DESC: Descendent
    The sort array is optional. You can use simple properties other than the ones in the parameters array to sort the outcome.

Returns

An array of items that can be iterated.

Example
Example
Var list = SomeListObjectofTypeLoCustomer
var ParamsArray=[{ "subValidFrom": "2011-12-20 00:00:00", "op" : "EQ" },{ "countryState": "GA", "op" : "EQ" }];
var SortArray=[{"classOfTrade" : "ASC"}];
list.getItemsByParamArray(ParamsArray,SortArray);