Executing entry points in HTML
To execute an entry point in a form, add a view field with custom HTML that uses the arInvoke Object commands to execute entry points in a browser:
- arInvokeEntryPoint ("windowID","serverName","guideName") — Executes the specified entry point guide as long as the application list field (ID 1575) is also available and visible on the same form that contains the view field.
- arInvokeGuide ("windowID","serverName","guideName") — Executes the specified guide.
- arInvokeForm ("windowID","serverName","form","mode") — Executes the specified form in New or Search mode. Valid values for mode are New and Search.
You can use single or double quotation marks in these commands because JavaScript conventions permit strings to be enclosed by single or double quotation marks.
To execute entry points in HTML
- Create a view field.
See View-fields. - Select the view field.
- In the Properties tab, select the Text property, and click its ellipsis button.
In the Text dialog box, enter your commands.
For example:<html>
<script>
function doInvokeForm(server, form, mode) {
if("external" in window && "arInvokeForm" in window.external)
arInvokeForm(getCurrentWindowID_NS(), server, form, mode);
else
parent.arInvokeForm(parent.getCurrentWindowID_NS(), server, form, mode);
}
function doInvokeEntryPoint(server, guideName) {
if("external" in window && "arInvokeEntryPoint" in window.external)
arInvokeEntryPoint(getCurrentWindowID_NS(), server, guideName);
else
parent.arInvokeEntryPoint(parent.getCurrentWindowID_NS(), server, guideName);
}
function doInvokeGuide(server, guideName) {
if("external" in window && "arInvokeGuide" in window.external)
arInvokeGuide(getCurrentWindowID_NS(), server, guideName);
else
parent.arInvokeGuide(parent.getCurrentWindowID_NS(), server, guideName);
}
</script>
<body>
<form>
<a href="javascript:doInvokeForm('@','HelpDesk', 'search')">Search HelpDesk form with arInvokeForm</a> <br> <br>
<a href="javascript:doInvokeEntryPoint('ServerA','HelpDesk:EntryPointNew_ALG')">HelpDesk form New entry with arInvokeEntryPoint</a> <br> <br>
<a href="javascript:doInvokeGuide('@','HelpDesk:Validation_ALG')">HelpDesk form validation activelink guide with arInvokeGuide</a> <br> <br>
</form>
</body>
</html>In this example, doInvoke Object makes sure that the arInvoke Object functions are available. In a browser, the functions are not available in the view field because the view field is an HTML iframe element. To access the arInvoke Object functions in a browser, you must reference parent.
- Click OK.
- Right-click the form, and select Save.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*