Choose where you’d like to start

openUrl

Note: This task is applicable only to the following Zoho services:
  • Zoho Creator
  • Zoho CRM
  • Zoho Books
  • Zoho Billing
  • Zoho Invoice
  • Zoho Inventory

Overview

The open url deluge task when executed takes the user to the specified url.  

The URL can also be opened in iframe. Support for iframe provides huge opportunities for developers to improve the interface/interaction of their applications and provide Web 2.0 (AJAX) like experience to their users where parts of the Web Page can be refreshed with new data from the server without having to repaint the entire screen space. 

Note:
openUrl() is a terminal statement and will execute only the last openURL task when configured more than once.

The openURL task will not be executed, if a user defined function (with the openUrl task) is invoked from a custom action that is placed in the View header and type is set as execute action for each record. 
Reason: A custom action placed in the view header can be invoked on all or specific records in a view. Hence, if a custom action that executes the openURL task is invoked on all or many number of records in a view, it will open that many browser windows. A user who invokes this custom action may sometimes not be aware of the actual reason for this behaviour. Hence, openURL task is not supported when the custom action is placed in the view header.

Syntax

openUrl(<URL>, <window>, [optional_param]);

where:

ParameterData typeDescription

<URL>

TEXT

URL or the Zoho Creator's URL param that will be opened.

Examples for Zoho Creator's URL param: #Form:form1, #Report:report1

Note:

  • Know the Zoho Creator's functionality-based, navigational, and style-based URLs that can be used as a value to this parameter.
  • All URLs except Zoho Creator's URL params must contain the appropriate protocol (Example: https://www.zoho.com)

<window>

TEXTThe type of window in which the URL will be opened.

Applicable values: 

  • same window
  • new window
  • parent window
  • popup window
  • iframe
Note: Only Zoho Creator's URL params can be opened in a popup window. If this param is supplied with "popup window" and the <URL> param is not a Zoho Creator's URL param, the specified URL will be opened in a new window. Examples for Zoho Creator's URL param: #Form:form1, #Report:report1

<optional_param>

(Optional)

TEXT
  • If the <window> param is specified as "popup window", you can customize the dimension of the popup window by supplying height and width information using this param.
    The value should be in the format: "height=<height>,width=<width>"
  • If the <window> param is specified as "new window", the new window occurs only once if this param is left empty. Subsequent clicks lead to the screens opening in the same new window. You can specify successive=true as the value to this param to open all subsequent screens in new windows. 
  • If the <window> param is specified as "iframe", you can specify frame name using this param.

Example 1: Open a report of the same application form

Assuming a user submits a form called "My Contacts", you can use the following snippet in the On Success workflow action to take him to the form's report.

openUrl("#Report:My_Contacts_Report", "same window");

where:

"#Report:My_Contacts_Report"
The TEXT that represents the Zoho Creator URL. It opens the report with link name - My_Contacts_Report from the same application the task is executed.
"same window"
The TEXT that represents the URL needs to be opened in the same window.

Example 2: Open a form of the same application in a popup window

The following example opens the form - Orders in a popup window of height - 510 px, width - 420 px, and sets the color - #34ebd2 as its background:

openUrl("#Form:Orders?zc_BgClr=#34ebd2","popup window","height=510px,width=420px");

where:

"#Form:Orders?zc_BgClr=#34ebd2"
The TEXT that represents the Zoho Creator URL. It opens the form with link name - Orders from the same application the task is executed. The zc_BgClr is a styling attribute that fills the background of the form with the specified color.

Example 3: Open a form of a different application

The following example opens the form - registration from your application - customer-details:

openUrl("https://app.zohocreator.com/shawn24/customer-details#Form:Registration", "same window");

where:

"https://app.zohocreator.com/shawn24/customer-details#Form:Registration"
The TEXT that represents the form URL

Example 4: Redirect to the previous URL loaded in the browser's history

The following script navigates to the previous URL loaded in the browser's location bar:

openUrl("#Script:page.back","same window");

Example 5: Use iframe on a Zoho Creator page

Let's say we have the following iframe snippet in a Creator page:

<iframe name="frameName" width="1000" height="1000" frameborder="0" scrolling="yes"> </iframe>

The following deluge script is written on the 'On User Input' workflows section. It opens the above mentioned iframe with different URLs depending on the selected product:

if (Product=="Creator")
  {
    openUrl("https://www.zoho.com/creator", "iframe", "frameName");
  }
else if (Product == "CRM")
  {
    openUrl("https://www.zoho.com/crm", "iframe", "frameName");
  }

Related Links

Get Started Now

Execute