Error while calling business process while clicking a call button
Hi Team,
I am trying to call a business process on clicking of active row button(Call). I wrote the below code in section schema page.
Code :
define("UsrCandidates1Section", ["UsrCandidates1SectionResources", "terrasoft", "ControlGridModule",
"BaseProgressBarModule", "css!BaseProgressBarModule", "ProcessModuleUtilities","ProcessModuleUtilitiesResources"],
function(resources, Terrasoft, ProcessModuleUtilities)
{
"operation": "insert",
"name": "DataGridActiveRowOpenAction",
"parentName": "DataGrid",
"propertyName": "activeRowActions",
"values": {
"className": "Terrasoft.Button",
"style": Terrasoft.controls.ButtonEnums.style.BLUE,
"caption": "Call",
"tag": "Call",
"click": {
"bindTo": "onOpenPrimaryContactClick"
}
//Add a new swtich case parameter for the new button added on the active row
}
},
onOpenPrimaryContactClick : function()
{
var activeRow =this.get("ActiveRow");
if (activeRow) {
// Determining the base candidate record Id.
var primaryId = this.get("GridData").get(activeRow).get("Id");
alert(primaryId);
if(primaryId)
{
var args = {
// The name of the process that needs to be launched.
sysProcessName: "UsrTest",
// The object with the ContactParameter incoming parameter value for the CustomProcess process.
parameters: {
ProcessSchemaParameter1: primaryId
},
//callback: config.callback,
//scope: config.scope
};
debugger;
alert("test1");
ProcessModuleUtilities.executeProcess(args);
// Launch of the custom business process.
alert("test2");
}
}
},
While clicking on the Call Button the alerts which i kept before ProcessModuleUtilities.executeProcess(args) are getting executed.When alert("test1") got executed i am getting the below error.
Can you please let us know where the code went wrong.
hoping for a positive reply.
Regards,
manikanta
Like
Please deploy the application locally and debug the code.
https://academy.bpmonline.com/documents/technic-sdk/7-13/client-code-debugging
https://academy.bpmonline.com/documents/technic-sdk/7-13/server-code-debugging