You can also invoke a custom function to open the record in a new page and subsequently print it. To do so, Please follow the steps mentioned below:
- Click on "Edit this application" and click on "Script" tab.
- Click on "Functions" displayed in the top left corner. [Below the various tabs.]
- You can create a function, viz Print_Rec, with an argument. In this case the argument can be an interger.
- Drag and drop the openUrl task into the deluge editor.
- Click on "edit" of the openUrl task.
- Specify the following url string:
- Select the openUrl in as "New Window".
- Click Done to add the task and click "Save Script" to save the function.
- Mouse over the "Views" tab and navigate to the view in which this function is to be included.
- From the left pane, from under "Display", click on "Column Properties".
- Select the "ID" field to be displayed in the view.
- Form under "Actions" in the left pane, click on "Custom Actions".
- Specify the function name to be displayed in the view, select the "Print_Rec" function that we just created and pass the "ID" as the argument.
- Click "Done" to save.
When you access the view now, you can see the function being displayed next to each record. Clicking on the function will execute the function