Hi community,
I try to trigger a business process that take one argument when I click on a button. When I click on my button the pop-up (as defined in my code below) shows up but I have an error via the console in chrome dev tools.
Here is the error that occurs (XML parse error: not well formatted):
Here is my schema :
define("ContactSectionV2", ["ProcessModuleUtilities", "ContactSectionV2Resources"], function(ProcessModuleUtilities, resources) {
return {
entitySchemaName: "Contact",
details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
diff: /**SCHEMA_DIFF*/[
{
"operation": "insert",
"name": "BtnCreateCandidat",
"parentName": "CombinedModeActionButtonsCardLeftContainer",
"propertyName": "items",
"values": {
itemType: Terrasoft.ViewItemType.BUTTON,
style: Terrasoft.controls.ButtonEnums.style.BLUE,
classes: {
"textClass": ["actions-button-margin-right"],
"wrapperClass": ["actions-button-margin-right"]
},
click: { bindTo: "OnClickCreateCandidat" },
tag: "CombinedModeActionButtonsCardLeftContainer",
caption: { bindTo: "Resources.Strings.BtnCreateCandidatCaption" },
hint: { bindTo: "Resources.Strings.BtnCreateCandidatHint" },
enabled: true,
},
},
]/**SCHEMA_DIFF*/,
methods: {
OnClickCreateCandidat: function(){
var contactId = this.getActiveRow().get("Id");
var args = {
parameters: {
ProcessSchemaContactStr: contactId
},
sysProcessName: "MTF_CreateCandidatIfNotExists",
callback: function(){
this.showInformationDialog(contactId);
return true;
},
// scope: this
};
ProcessModuleUtilities.executeProcess(args);
return true;
},
}
};
});
And here is my business process :
It takes one argument as input :
"parse contactId" is a simple line to transform a string to a Guid :
Guid.Parse([#ContactStr#])
and I set the value returned to the ContactId argument.
then I try to read a candidate with the Contact Guid that I just set (a Candidate has a lookup field to a Contact object).
It just check if the candidate was found, if not it will create it. The BP returns the Candidate Guid.
The business process runs, the Candidate object is created (empty for some reason, not even with the Contact lookup filled) each it needs but I always have the XML parse error.
Do you know how can I debut this and how can I resolve this ?
Best regards,
Julien G.