For the managed package runtime, this page contains a NavigationUtils ReadMe for each Vlocity release.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Vlocity Insurance and Health Spring '20
This module exposes a collection of utilities designed to simplify navigational functions.
new exports.PageReference(type, attributes, [stateParams])
To navigate in Lightning Experience, Lightning Communities, or the Salesforce mobile app, define a PageReference object. The PageReference type generates a unique URL format and defines attributes that apply to all pages of that type.
|
Param |
Type |
Description |
|---|---|---|
|
type |
PageReferenceType |
Page reference type. |
|
attributes |
Object |
Page reference attributes. |
|
[stateParams] |
string ⎮ any |
State parameters passed to the target context. Can be in the form of a url query string or an object. |
PageReference.unfreeze(pageReference, newParams)
Utility method to unfreeze, and update PageReference object returned from @wire(CurrentPageReference) is frozen
Kind: static method of PageReference
|
Param |
Type |
Description |
|---|---|---|
|
pageReference |
PageReference |
A page reference object received from @wire(CurrentPageReference) |
|
newParams |
string ⎮ any |
[stateParams] - State parameters to be extended on the current reference. Can be in the form of a url query string or an object. |
new exports.AppPageReference(appTarget, pageReference)
A standard or custom app available from the App Launcher in an org. Use this type to create custom navigation components that take users to a specific app or to a page within an app. Connected apps aren’t supported.
|
Param |
Type |
Description |
|---|---|---|
|
appTarget |
string |
App that you are navigating to. Pass either the |
|
pageReference |
PageReference |
Identifies a specific location in the app you are navigating to. Pass in the |
ns/navigationUtils.ComponentPageReference
Kind: static class of ns/navigationUtils Supports: Lightning Experience, Salesforce Mobile App
new exports.ComponentPageReference(name, [stateParams])
A Lightning component. To make an addressable Lightning web component, embed it in an Aura component that implements the lightning:isUrlAddressable interface.
|
Param |
Type |
Description |
|---|---|---|
|
name |
string |
The Lightning component name in the format namespace__componentName |
|
[stateParams] |
string ⎮ Object |
State parameters passed to the target context. Can be in the form of a url query string or an object. |
new exports.KnowledgeArticlePageReference(articleType, urlName)
A page that interacts with a Knowledge Article record.
|
Param |
Type |
Description |
|---|---|---|
|
articleType |
string |
The articleType API name of the Knowledge Article record. In Communities, articleType is ignored. |
|
urlName |
string |
The value of the urlName field on the target KnowledgeArticleVersion record. The urlName is the article's URL. |
new exports.LoginPageReference(action, [stateParams])
A page for authentication into a community.
|
Param |
Type |
Description |
|---|---|---|
|
action |
'login' ⎮ 'logout' |
A login-related action to be performed. Possible values are: 'login' or 'logout'. |
|
[stateParams] |
string ⎮ Object |
State parameters passed to the target context. Can be in the form of a url query string or an object. |
new exports.NamedPageReference(pageName, [stateParams])
A standard page with a unique name. If an error occurs, the error view loads and the URL isn’t updated.
|
Param |
Type |
Description |
|---|---|---|
|
pageName |
string |
The unique name of the page. |
|
[stateParams] |
string ⎮ any |
State parameters passed to the target context. Can be in the form of a url query string or an object. |
new exports.CommNamedPageReference(pageName, [stateParams])
A standard page with a unique name, for use in communities. If an error occurs, the error view loads and the URL isn’t updated.
|
Param |
Type |
Description |
|---|---|---|
|
pageName |
string |
The unique name of the page. |
|
[stateParams] |
string ⎮ any |
State parameters passed to the target context. Can be in the form of a url query string or an object. |
new exports.NavItemPageReference(tabName, [stateParams])
A page that displays the content mapped to a CustomTab. Visualforce tabs, Web tabs, Lightning Pages, and Lightning Component tabs are supported.
|
Param |
Type |
Description |
|---|---|---|
|
tabName |
string |
The unique name of the CustomTab. |
|
[stateParams] |
string ⎮ any |
State parameters passed to the target context. Can be in the form of a url query string or an object. |
new exports.ObjectPageReference(objectName, [action], [filter])
A page that interacts with a standard or custom object in the org and supports standard actions for that object.
|
Param |
Type |
Default |
Description |
|---|---|---|---|
|
objectName |
string |
The API name of the standard or custom object. For custom objects that are part of a managed package, prefix the custom object with ns__ |
|
|
[action] |
string |
|
The action name to invoke. Valid values include |
|
[filter] |
string |
|
Id of the object page. Default is Recent. |
new exports.RecordPageReference(id, [objectName], [action])
A page that interacts with a relationship on a particular record in the org. Only related lists are supported.
|
Param |
Type |
Default |
Description |
|---|---|---|---|
|
id |
string |
The 18 character record ID. |
|
|
[objectName] |
string |
The API name of the record’s object. Optional for lookups. |
|
|
[action] |
string |
|
The action name to invoke. Valid values include |
new exports.RelationshipPageReference(recordId, [objectApiName], [relationshipApiName], [actionName])
A page that interacts with a relationship on a particular record in the org. Only related lists are supported.
|
Param |
Type |
Default |
Description |
|---|---|---|---|
|
recordId |
string |
The 18 character record ID of the record that defines the relationship. |
|
|
[objectApiName] |
string |
The API name of the object that defines the relationship. Optional for lookups. |
|
|
[relationshipApiName] |
string |
The API name of the object’s relationship field. |
|
|
[actionName] |
string |
|
The action name to invoke. Only view is supported. |
new exports.WebPageReference(url, replace)
An external URL.
|
Param |
Type |
Description |
|---|---|---|
|
url |
string |
The URL of the page you are navigating to. |
|
replace |
Boolean |
replace the current page with this URL in your browser’s session history, set |
ns/navigationUtils.pageReferenceTypes : enum
Kind: static enum of ns/navigationUtils Read only: true
ns/navigationUtils.parseParams(queryString)
Expands query params to an object
Kind: static method of ns/navigationUtils
|
Param |
Type |
Description |
|---|---|---|
|
queryString |
string |
key=value pairs separated by & |
ns/navigationUtils.normalizeParams(namespacedParams) ⇒ object
Returns a copy of a params object with the namespace values removed. Duplicate values will be overwritten.
Kind: static method of ns/navigationUtils
|
Param |
Type |
Description |
|---|---|---|
|
namespacedParams |
object |
A collection of params derived from pageReference.state. |
ns/navigationUtils~KNOWLEDGE_ARTICLE : 'Knowledge Article'
Kind: inner constant of ns/navigationUtils