Hi community,
I'd like to add button on a active row in a data grid :
For that I found posts on the community that explain how to achieve that :
https://community.creatio.com/questions/alteradd-row-buttons-newly-crea…
https://community.creatio.com/questions/add-button-row-section
https://community.creatio.com/articles/add-button-active-row-detail
https://community.creatio.com/questions/override-section-open-record-bu…
I tried to follow them. Here is my code :
define("ContactSectionV2", ["ProcessModuleUtilities"], function(ProcessModuleUtilities) {
return {
entitySchemaName: "Contact",
details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
diff: /**SCHEMA_DIFF*/[
{
"operation": "insert",
"name": "BtnRowCreateCandidature",
"parentName": "DataGrid",
"propertyName": "activeRowActions",
"values": {
"className": "Terrasoft.Button",
"style": Terrasoft.controls.ButtonEnums.style.BLUE,
"tag": "DataGridCandidature",
"caption": { "bindTo": "Resources.Strings.BtnRowCreateCandidatureCaption" },
"hint": { "bindTo": "Resources.Strings.BtnCreateCandidatureHint" },
}
}
]/**SCHEMA_DIFF*/,
methods: {
onActiveRowAction: function(buttonTag, primaryColumnValue){
this.callParent(arguments);
switch(buttonTag){
case "DataGridCandidature":
this.myCustomFunction(primaryColumnValue);
break;
}
},
myCustomFunction: function(primaryColumnValue){
this.showInformationDialog(primaryColumnValue);
},
}
};
});
But for some reasons, the newly created button never showed up.
Is this the right way to create a button in a datagrid row ?
Best regards,
Julien Gunther