How to create a button that is displayed on an SCM form in Workbench?

Document ID : KB000050599
Last Modified Date : 14/02/2018
Show Technical Document Details

To be updated

 

Description:

SCM forms do support buttons, but it was undocumented feature.

Solution:

Below is an example of how to implement a button in SCM form using Java script:

<events language="javascript" client="eclipse">
function button1Clicked(){
var file1 = editor.getTextFieldValue("hodproject");
var app1 = "notepad.exe";
java.lang.Runtime.getRuntime().exec(app1 + " " + file1);}
</events>
<button id="button1" label = "button1"/>

Explanation:

  1. Create an xml element "button" and label it as needed.

  2. Define the function for the "Clicked" event [Format - <Field-Name>Clicked()].