2. Get Record
context.getEntity(slug, id)
async· returnsRecord<string, any>
Retrieves a single record from an entity by its ID. The result is always wrapped in a values array — access your record at result.values[0].
Prop
Type
var lecture = await context.getEntity("lectures", context.router.id);
console.log("Lecture info", lecture.values[0]);
Returned value — an object with a values array containing the single matched record, including all system fields:
{
"values": [
{
"ID": "12",
"Title": "Introduction to React",
"Instructor": { "ID": "3", "Name": "Jane Doe" },
"Date": "2026-03-15T10:00:00Z",
"Duration": 90,
"CreateDate": "2026-01-10T08:00:00Z",
"CreateUser": { "ID": "1", "FullName": "Mileva Service" },
"ModifyDate": "2026-03-01T14:22:00Z",
"ModifyUser": { "ID": "7", "FullName": "John Smith" },
"SystemStatusID": { "ID": "1", "Name": "Active" }
}
]
}
context.getEntities(slug [, queryString])
async· returnsRecord<string, any>
Retrieves multiple records from an entity. Supports filtering, sorting, and pagination via a query string. The records are in result.values.
Prop
Type
var response = await context.getEntities("invoices");
var invoices = response.values;
console.log("Invoices:", invoices);
var user = context.router.id;
var response = await context.getEntities(
"timeoff",
`filter=and_Employee_eq_${user}&filter=and_Status_eq_2`
);
var timeOffs = response.values || [];
console.log("Time-offs:", timeOffs);
var user = context.router.id;
var response = await context.getEntities(
"timeoff",
`skip=0&take=100&filter=and_Employee_eq_${user}&filter=and_Status_eq_2`
);
var timeOffs = response.values || [];
console.log("Time-offs:", timeOffs);
Returned value — an object with a values array containing all matched records, including system fields on each:
{
"values": [
{
"ID": "101",
"InvoiceNumber": "INV-2026-001",
"Company": { "ID": "5", "Name": "Acme Corp" },
"TotalAmount": 1500.00,
"Status": { "ID": "1", "Name": "Paid" },
"CreateDate": "2026-01-15T09:00:00Z",
"CreateUser": { "ID": "7", "FullName": "John Smith" },
"ModifyDate": "2026-02-01T11:30:00Z",
"ModifyUser": { "ID": "7", "FullName": "John Smith" },
"SystemStatusID": { "ID": "1", "Name": "Active" }
},
{
"ID": "102",
"InvoiceNumber": "INV-2026-002",
"Company": { "ID": "7", "Name": "Globex Inc" },
"TotalAmount": 840.00,
"Status": { "ID": "2", "Name": "Pending" },
"CreateDate": "2026-02-10T10:00:00Z",
"CreateUser": { "ID": "3", "FullName": "Jane Doe" },
"ModifyDate": "2026-02-10T10:00:00Z",
"ModifyUser": { "ID": "3", "FullName": "Jane Doe" },
"SystemStatusID": { "ID": "1", "Name": "Active" }
}
]
}
Filters follow the pattern filter=and_{FieldName}_{operator}_{value}. Common operators: eq (equals), neq (not equals), gt (greater than), lt (less than), contains. Chain multiple filters by repeating the filter= parameter.