******* Invoke
a Workflow using Custom Buttons *******
Create the Workflow as per your requirement.
1- Validate it to ensure there is no error.
2- Publish and activate the workflow.
Create button and write a code to invoke workflow.
1 - Create a Control and Assign the following properties:
- Name ,
Display String Override , Runtime , MethodInvoke : "CallWF"
2 - Invoke the Web Layout.
- Place the
button on form.
3 - Write a Applet Server Script to Call the Method and
Enable the button.
function WebApplet_PreCanInvokeMethod
(MethodName, &CanInvoke)
{
if(MethodName
== "CallWF")
{
CanInvoke="TRUE";
return
(CancelOperation);
}
return
(ContinueOperation);
}
4 - Create Applet User Property :
Name :
Named Method: CallWF
Value : 'INVOKESVC',
'Workflow Process Manager', 'RunProcess','"ProcessName"',
'"%Name of your workflow here%"', '"RowId"','[Id]'
5 - Test the Record
No comments:
Post a Comment