Posts

Showing posts from November, 2016

Invoke a taskflow from button

From Script:                 var inputPropSet; var outputPropSet; var taskUIsvc; inputPropSet = TheApplication().NewPropertySet(); outputPropSet = TheApplication().NewPropertySet(); taskUIsvc = TheApplication().GetService("Task UI Service (SWE)"); inputPropSet.SetProperty("TaskName","<Task Name>"); taskUIsvc.InvokeMethod("LaunchTaskFromScript",inputPropSet,outputPropSet);

Get the Date from user on button click and Validate the date entered

Problem: There was a scenario, where I had to Pass the effective date of an Insurance policy to the workflow for further processing whenever the user clicks a button Solution: I used the browser script of that applet and invoked the following script:       if(name == "<button method>")     {     var person = prompt("Please enter the effective date","MM/DD/YYYY");     var datePat = /^(\d{2,2})(\/)(\d{2,2})\2(\d{4}|\d{4})$/;     var matchArray = person.match(datePat); // is the format ok? if (matchArray == null) { alert("Date must be in MM/DD/YYYY format");  } else{ //Month Check var month = matchArray[1]; // parse date into variables var day = matchArray[3]; var year = matchArray[4]; if (month < 1 || month > 12) { // check month range  alert("Month must be between 1 and 12"); } //Day Check if (day < 1 || day > 31) {  alert("Day m...

File Saving in Folder other than Temp

Solution: Add following lines in the client and tools cfg as required. [EAIFileTransportConfigSubsys] EAIFileTransportFolders = c:\;d:\

Workflow Calling

Calling a Workflow from user property BC User Property Named method n Value- "Change Plan",  "INVOKESVC", "<The BC In which the User property is defined>", "Workflow Process Manager", "RunProcess", "'ProcessName'", "'<Workflow Name>'", "'RowId'", "[Id]", "'<Process Property>'", "[<Field Name>]", "'<Process Property>'", "'<String Value>'" Note: RowId- This points to the 'Object Id' Process Property of the workflow. [Id]-This points to Id Field in the BC Application RunTime Create a Action Set: With Action Type: BusService Business Service Name: Workflow Process Manager Business Service Method: RunProcess Business Service Context: "ProcessName", "<WorkFlow Name>" The Object Id is defaulted with Id Field