Description
Creates a link to any application page.
Syntax
makePageLink(dynamic table, dynamic pageType, dynamic keys = null, dynamic additionalParams = null)
Arguments
table
a phone number.
pageType
page type like "list", "add" or "edit"
keys
an array with key columns and their values. Required when creating a link pointing to Edit or View pages.
This should be an array with name=>values pairs i.e. new XVar("page", "list1")
When used in 'After record updated' or 'After record added' event, pass the keys parameter of the event as is.
additionalParams
any additional parameterss you want to add to the URL. For instance, array( "page" => "list1" ) will create a URL of the additional list page named "list1"
Return value
A link to the respective page like
Example 1
Create a link to the Cars table additional list page named list1.
CommonFunctions.makePageLink( "cars", "list", null, new XVar("page", "list1"))
Returns cars/list/?page=list1
Example 2
In 'After Record Added' event create a link to the View page of the same record.
CommonFunctions.makePageLink( "cars", "view", keys )
Returns cars/view/?editid1=35