Navigate
A sub namespace of Application, exclusive for navigate operations
//accessing to Application.Navigate methods
SW.Application.Navigate.{methodName}
toDocument
Description
This method can be used to navigate do the document's feed.
Method(s)
1 function toDocument(documentName: DocumentName, documentId: string): void
Parameter | Type | Required | Defaults | Description |
---|---|---|---|---|
documentName | DocumentName | true | Document type to navigate | |
documentId | string | true | Document's id |
Basic Usage
SW.Application.Navigate.toDocument(SW.DocumentName.Client, 'clientId');
Response
When called it will navigate to the client's feed with the document id passed.
toNewTab
Description
This method can be used to open a page in a new tab.
Method(s)
1 function toNewTab(url: string,
2 params?: {
3 useSkillsBaseUrl: boolean
4 } = {
5 useSkillsBaseUrl: true
6 }
7 ): void;
Parameter | Type | Required | Defaults | Description |
---|---|---|---|---|
url | string | true | Url Link | |
useSkillsBaseUrl | boolean | false | true | Use Skills base url |
Basic Usage
SW.Application.Navigate.toNewTab("url");
Response
It will open a new tab with the url passed.
toWorkspace
Description
This method can be used to navigate to a workspace.
Method(s)
1 function toWorkspace(workspaceId: string,
2 params: {
3 documentName?: DocumentName;
4 documentId?: string
5 } = {}
6 ): void
Parameter | Type | Required | Defaults | Description |
---|---|---|---|---|
workspaceId | string | true | Workspace id to navigate | |
url | String | false | " " | Url Link |
documentName | DocumentName | false | If the workspace is inside a document | |
documentId | string | false | Document id if the workspace is inside a document |
Basic Usage
SW.Application.Navigate.toWorkspace('workspaceId', {documentName: SW.DocumentName.Job, documentId: 'jobId'});
Response
It will navigate to a workspace that is inside the job document passed.