Autorun AI Docs
Process DesignerUI FunctionUI Functions Reference

11. Router


context.router.id

sync · returns string

Returns the primary record ID from the current page URL. This is the ID segment in a detail page route such as .../offers/12 — in that case context.router.id returns "12".

var offerID = context.router.id;
var offer = await context.getEntity("offers", offerID);

context.router.subId

sync · returns string

Returns the secondary ID from the URL, used on nested detail pages (e.g. .../offers/12/items/5 — returns "5").

var itemID = context.router.subId;

context.router.id and context.router.subId correspond to the URL segments of the currently active Details Page. If you are not on a details page, these will be undefined. Always check before using them in list or dashboard contexts.