getResolvedSemanticURL(routeKey, payload, params)
Obtains the resolved semantic URL for a route key.
Returns
The resolved semantic URL as a string.
Parameters
Name | Type | Description | Required |
routeKey | string | The type of action supported by the semantic URL utility. | ✅ |
payload | object | The unique identifier that matches with app routes. | ✅ |
params | object | The value assigned to the dynamic URL query parameter. | ✅ |
Usage example
In this example, the API takes the supported action from the route key, identifies the app route from the payload, assigns the value to the query parameter, and returns the resolved semantic URL.
const semanticUrlUtils = PCore.getSemanticUrlUtils();
const routeKey = semanticUrlUtils.getActions().ACTION_OPENWORKBYHANDLE;
const payload = {caseClassName: "ON8TTL-MyApp-Work-MyCase"};
const params = {workID: "C-007"};
const resolvedURL = semanticUrlUtils.getResolvedSemanticURL(routeKey, payload, params);
Previous topic getActions() Next topic APIs in the StakeholderUtils module