Hi community,
I try to trigger a business process from a custom button. I in the post that I need the ProcessModuleUtilities to achieve that. Here is my code :
define("MTF_Candidat1Page", ["MultiChoiceMixin", "ProcessModuleUtilities"], function(ProcessModuleUtilities) {
return {
entitySchemaName: "MTF_Candidat",
...
methods: {
OnClickCreateInterview: function(){
var args = {
sysProcessName: "MTFtestbtn" // this is the name of my business process. It simply send me a mail for now.
};
ProcessModuleUtilities.executeProcess(args);
this.showInformationDialog("Busniess process triggered"); // just to show something to let me know the function triggered properly the busniess process
},
},
...
diff: /**SCHEMA_DIFF*/[
...
{
"operation": "insert",
"name": "BtnCreateInterview",
"values": {
"layout": {
"colSpan": 24,
"rowSpan": 1,
"column": 0,
"row": 7
},
"itemType": 5,
"classes": {
"textClass": [
"actions-button-margin-right"
],
"wrapperClass": [
"actions-button-margin-right"
]
},
"click": {
"bindTo": "OnClickCreateInterview"
},
"tag": "OnClickCreateInterview",
"caption": {
"bindTo": "Resources.Strings.BtnCreateInterviewCaption"
},
"hint": {
"bindTo": "Resources.Strings.BtnCreateInterviewHint"
}
},
"parentName": "ProfileContainer",
"propertyName": "items",
"index": 7
}
...
]/**SCHEMA_DIFF*/
}
Now when I click on the button on my candidate page I have this error :
"Uncaught TypeError: ProcessModuleUtilities is undefined"
Do you have other docs to trigger business processes on custom button press ?
Best regards,
Julien