JavaScript functions

JavaScript functions are available for use in placing and managing content at dashboard and content module levels.

You can select from a list of JavaScript functions, or you can create your own JavaScript function. For example, you can use the updateModule JavaScript function update the contents of a content module

This table shows the available JavaScript functions.

JavaScript Function Description Replacements
updateModule Select this JavaScript function to modify the contents of a specified module when the current item is clicked on.

The JavaScript template copied to the URL/Script field is:

updateModule("<target module id>>","<<URL>>")
Note: When you use this JavaScript function and the user clicks the link, the changes that display for the current user session are made to modules are temporary and not saved, and, therefore, does not display in future user sessions.
Replace <target module id> with the ID of the module where the content is to be modified, for example, id1234. You can access the module's ID by selecting the target module and clicking Edit > Properties tab.

Replace <URL> with the new URL for the module's content.

Form (default product line) Select this JavaScript function to launch a Lawson Portal form from the user’s default product line when the current item is clicked.

You can also search forms if the application has been registered within Framework Services. To search for forms, click Search.

The JavaScript template copied to the URL/Script field is:

launchToken("<<token>>")
Replace <<token>> with the ID of the form to be launched.
Form

Select this JavaScript function to launch a Lawson Portal form from a specified product line when the current item is clicked.

You can also search forms if the applications has been registered within Framework Services. To search for forms, click Search.

The JavaScript template copied to the URL/Script field is:

launchForm("LAWFORM|PDL=<<product line>>|TKN=<<token>>")
Replace <<product line>> with the name of the product line.

Replace <<token>> with the ID of the form that you want to launch.