ViewURL function
Syntax
ViewURL(URL [, new_window])
Description
Use the ViewURL function to navigate to the location specified by the URL parameter.
This is a deferred execution command: the browser is launched after any executing PeopleCode has run to completion. You can also specify whether the new page launches a new browser, or replaces the current page in the browser.
Note:
This function does not issue any kind of warning to the user about losing data. Your application should verify that all data is saved before launching a new page.
The content specified by the URL is automatically wrapped by the portal template. If you do not want to wrap the content in the portal template, use the ViewContentURL function.
Important:
While the ViewURL function can be used to launch a fluid component from a classic component, if the classic component will be included in a fluid activity guide or master/detail component, do not use ViewURL or RedirectURL. Use the ViewURLTop function instead.
Parameters
| Parameter | Description |
|---|---|
|
URL |
Specify the location to navigate to. You can specify the URL either as a string value or as a URL saved in the URL table using the following format: URL. URL_ID |
|
new_window |
Specify whether the new page is opened in the current browser, or launched in a new browser window. This parameter takes a Boolean value: True to launch a new browser, False to replace the existing page. The default value is False. |
Returns
None.
Example
If &MyPage Then
ViewURL(URL.MYPAGE);
Else
ViewContentURL("http://www.example.com");
End-If;