Skip to main content

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
ParameterTypeRequiredDefaultsDescription
documentNameDocumentNametrueDocument type to navigate
documentIdstringtrueDocument'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;
ParameterTypeRequiredDefaultsDescription
urlstringtrueUrl Link
useSkillsBaseUrlbooleanfalsetrueUse 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
ParameterTypeRequiredDefaultsDescription
workspaceIdstringtrueWorkspace id to navigate
urlStringfalse" "Url Link
documentNameDocumentNamefalseIf the workspace is inside a document
documentIdstringfalseDocument 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.