ebs.getByQuery
Returns a collection of records based on a query expression (fetch object). If no filtering conditions are specified, then all the entity data will be returned.
HINT For higher performance, use filtering conditions. It enables you to get only the data that is relevant to you.
Syntax
Copy
ebs.getByQuery(fetchObj: IFetch, callback: any, errorCallback: any): void
Where the Fetch Object has the following syntax:
Copy
entity: {
"name": <entity_name>,
"alias": <entity_alias>
},
[where: {<filtering_criteria>,] }
[page: {<paging_criteria>,]}
[orderby: {<ordering_criteria>,] }
}
NOTE If you want to join data from various entities and use it in form, views, filtered results, charts, etc, you need to:
- Make sure that there are at least two entities in the system.
- Create relationships between the entities on which you do the fetch.
- Add custom attributes to each entity for which you do the fetch; you will use them when defining the fetch.
| Parameter | Description |
|---|---|
entity_name
|
The parent entity, such as entity, attribute, relationship, systemuser, systemusertype, customizationset, businessunit, or portal. |
|
|
Assigns a unique alias for the entity. This alias is used to precede the entity's attributes' names when referring to them. |
filtering_criteria
|
Criteria for filtering the result set. |
paging_criteria
|
Criteria for selecting a specific subset of the result set. |
ordering_criteria
|
Criteria for ordering the result set. |
HINT If you use the Fetch Designer when creating views, it shows the output fetch object which you can copy paste into your code.
Response
| Key | Description |
|---|---|
Records
|
Detailed information about each record in the result set. |