Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This client-side class contains methods that allow performing various URL transitions.  This This class has no constructor;  methods the methods can be accessed using the with the s_go global object.

s_go.open(url, target, callback)


This method allows going through the URL. 

Info

It is not recommended to pass an absolute URL as a parameter value for this method, because it leads to scalability issues. Define the paths in a relative way, like shown see the example below.

Not recommendedRecommended
https://instance.example.com/record/task/record/task



Parameter(s):

NameTypeMandatoryDefault Value
urlStringYN
targetBooleanNN
callbackFunctionNN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titleopen
s_go.open('/list/user');


If you need to open a URL in a new window, pass the '_blank' value to the target parameter, . You also , you need to pass the newWindow parameter into your callback function. Check the example below for more information:

Code Block
languagejs
themeEclipse
titleopen
s_go.open('/list/user', '_blank');


Code Block
languagejs
themeEclipse
titleopen
linenumberstrue
s_go.open('/record/task?field_parent_id=' + s_form.getUniqueValue(), '_blank', (newWindow) => {
  s_i18n.getMessage('Create a new subtask', (response) => {     
    newWindow.s_form.addInfoMessage(response, 5000);
  });
});

s_go.openList(table, query)


This method allows opening the list of the specified table.


Parameter(s):

NameTypeMandatoryDefault Value
tableStringYN
queryStringNN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titleopenList
s_go.openList('user', 'condition=(active=1)&view=Support');

s_go.openRecord(table, sys_id)


This method allows opening the form of the specified record.


Parameter(s):

NameTypeMandatoryDefault Value
tableStringYN
sys_idStringYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titleopenRecord
s_go.openRecord(s_user.user.essence, s_user.userID);

s_go.reloadWindow()


This Use this method is used to refresh the current page.


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titlereloadWindow
s_go.reloadWindow();

s_go.getURL()


This method gets the current page URL.


Return:

TypeDescription
StringThe current page URL.


Example:

Code Block
languagejs
themeEclipse
titlegetURL
const url = s_go.getURL();

s_go.back()


This method allows to check checking if the form has been changed. If the form has been changed but not saved, a pop-up window appears notifying that the changes will be lost. As a result of the method, the user will be is redirected to the previous page.


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titleback
s_go.back();



Table of Contents
absoluteUrltrue
classfixedPosition