link

Creates a web address (URL) that will open a page for a specific record or navigation page.

Function

Classic console
link(record)
link(view, record, form)
link(edit, record, form)
link(create, object, form)
link(report, target)
link(chart, target)
link(board, target)

Nova Form Pages
link(view, record, nova shared form)
link(edit, record, nova shared form)

Arguments

ArgumentData Type
recordrecord
form(Optional) identifier or form record 
nova shared formform record
objectidentifier or form record
targetidentifier or form record

Comments

The link function can be used to create URLs pointing to individual records or console pages. This link may then, for example, be emailed to users as part of a workflow. Users who open links will be automatically directed to the login page if they have not already signed in. They will then be redirected to the link.

The result of the link function includes the whole web address, including the https prefix and servername. The result type is a URL string.

The user must also have access control permission to view the page/record requested, or they will receive an error message telling them that they do not have permission.

Links are not permalinks. They will generally not change, however links may change if a tenant is moved to a new server.

Record Links

If a record is provided to the link function, then the platform will automatically determine the default page for handling the record, and return a link accordingly.

For example:

link( currentuser() )

This will create a link that refers to the form, in view mode, for the current user.

Links to view records

Various keywords may be placed in front of the record to control what type of link should be returned, such as whether the link should open the record in view mode or edit mode.

You may explicitly direct the platform to generate a view mode link to a record's form by using the view keyword. The default form for the record's object will be used. You may also specify the name of a different compatible form to use. For example:

link( view, [My Record Variable] )
link( view, [My Record Variable], [My Custom Form] )

In the above example, 'My Record Variable' may refer to some record variable in the workflow, and 'My Custom Form' refers to the name of an appropriate form.

Links to edit records

Links may similarly be created that automatically open the record in edit mode by using the edit keyword.

For example:

link( edit, [My Record Variable] )
link( edit, [My Record Variable], [My Custom Form] )

Links to create records

You may create a link that directs the user to create a new record of some object by using the create keyword and the object name. You can specify the name of the specific form to use, or the default form for the object will be used if none is provided.

For example:

link( create, [Person] )
link( create, [Person], [My Custom Person Form] )

Page Links

You may create links that refer to specific pages by using a keyword that is appropriate for each page.

There must only be a single page that matches the name provided.

Examples:

link(report, [My report name])
link(chart, [My chart name])
link(board, [My board name])
link(screen, [My screen name])

Notes

  • The link function will always try to match a Classic form name before searching for a nova form name. Only if no classic form is found will Nova forms be searched.
  • Where the link function is unable to find a match for the require entity an exception is thrown at runtime.
  • The record type of the form and type of the record must be compatible, if not a exception will be thrown at runtime.