This client-side class contains provides methods that allow performing the system to perform 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 Use this method to go 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 paths in a the relative way, like shown path, see the example below. Not recommended | Recommended |
---|
https://instance.example.com/record/task | /record/task |
|
Parameter(s)Parameters:
ValueBooleanString | N | N |
callback | Function | N | N |
Return:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | open |
---|
|
s_go.open('/list/user'); |
If you need to To open a URL in a new window, pass the '_blank' value to the target parameter, . You also , you need to pass the a newWindow parameter object into your callback function. Check the example below for more information
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | open |
---|
|
s_go.open('/list/user', '_blank'); |
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | open() |
---|
linenumbers | true |
---|
|
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 Use this method to open the list of the specified table.
Parameter(s):
Valuevalue |
---|
table | String | Y | N |
query | String | N | N |
Return:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | openList |
---|
|
s_go.openList('user', 'condition=(active=1)&view=Support'); |
s_go.openRecord(table, sys_id)
This method allows opening Use this method to open the form of the specified record.
Parameter(s):
Valuevalue |
---|
table | String | Y | N |
sys_id | String | Y | N |
Return:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | openRecord |
---|
|
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:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | reloadWindow |
---|
|
s_go.reloadWindow(); |
s_go.getURL()
This Use this method gets to get the current page URL.
Return:
The This method returns the current page URL. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | getURL |
---|
|
const url = s_go.getURL(); |
s_go.back()
This Use this method allows to check if verify whether 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:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | back |
---|
|
s_go.back(); |