Bookshelf Home | Contents | Index | PDF |
Siebel Business Process Framework: Task UI Guide > Customizing Task UI > Starting a Task UI > Creating a Script to Start a Task UIYou can use a browser script or a server script to start a task UI. Your script calls the Task UI Service business service. It then passes the name of the task UI to the LaunchTaskFromScript business service method to start the task UI. You must compile the script into proxy JavaScript objects or to the Siebel runtime repository. Processing varies depending the following type of script you use:
In this situation, browser script or server script does not use the CanInvokeMethod method. Siebel CRM does the following work at run time:
Note the following restrictions when using a script with a task UI:
For more information, see About Event Handling. Example of a Client ScriptIn this example, the browser script locates the Create a Contact task UI, and then starts the task: function Applet_PreInvokeMethod (name, inputPropSet) var inputPropSet; inputPropSet = theApplication().NewPropertySet(); outputPropSet = theApplication().NewPropertySet(); taskUIsvc = theApplication().GetService("Task UI Service (SWE)"); inputPropSet.SetProperty("TaskName","Create a Contact"); <!-- Note: because taskUIsvc.Invokemethod() is required to pass outputPropSet, the outputPropSet is created. outputPropSet is not used to send results back to the task UI--!> taskUIsvc.InvokeMethod("LaunchTaskFromScript",inputPropSet,outputPropSet); theApplication().alert("Error" + e.toString()); Example of a Server ScriptIn this example, the server script opens the Create a Contact task UI: function WebApplet_PreInvokeMethod (MethodName) var inputPropSet; inputPropSet = TheApplication().NewPropertySet(); outputPropSet = TheApplication().NewPropertySet(); taskUIsvc = TheApplication().GetService("Task UI Service (SWE)"); inputPropSet.SetProperty("TaskName","Create a Contact"); <!-- Note: because taskUIsvc.Invokemethod() is required to pass outputPropSet, the outputPropSet is created. outputPropSet is not used to send results back to the task UI--!> taskUIsvc.InvokeMethod("LaunchTaskFromScript",inputPropSet,outputPropSet); |
Siebel Business Process Framework: Task UI Guide | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |