Pseudo Code to call WF Async and Sync Mode in eScript

CRM Teck

Major Difference between WF Async and Sync Mode calling by eScript:

Workflow Call in Async Mode:
GetService: Server Requests
Invoke Method: SubmitRequest

Workflow Call in Sync Mode:
GetService: Workflow Process Manager
Invoke Method: RunProcess

Pseudo Code :Workflow Call in Async Mode

var svc = TheApplication().GetService("Server Requests");

Pseudo Code :Workflow Call in Sync Mode

function Invoke_Process()
	var svc = TheApplication().GetService("Workflow Process Manager");
	var Input = TheApplication().NewPropertySet();
	var Output = TheApplication().NewPropertySet();
	var bo = TheApplication().ActiveBusObject();
	var bc = bo.GetBusComp("Account");
	var rowId = bc.GetFieldValue("Id");Input.SetProperty("ProcessName", "My Account Process");
	Input.SetProperty("Object Id", rowId);svc.InvokeMethod("RunProcess", Input, Output);

View original post