Hi community,
I installed the multichoice package from the marketplace and I created a combobox but for some reason I'm not able to save the data once I filled the created combobox.
Here is my schema :
define("MTF_Candidat1Page", ["MultiChoiceMixin"], function() { return { entitySchemaName: "MTF_Candidat", attributes: { "UsrComboBox": { "dataValueType": Terrasoft.DataValueType.LOOKUP }, }, mixins: { MultiChoiceMixin: "Terrasoft.MultiChoiceMixin" }, methods: { init: function() { this.callParent(arguments); this.mixins.MultiChoiceMixin.init.call(this, arguments); }, getMultiChoiceEntitiesConfig: function() { items = { UsrComboBox: { mainEntitySchemaName: "MTF_Candidat", mainColumnName: "Lkp_Francais", relatedEntitySchemaName: "MTFcompetenceslinguistiques", relatedColumnName: "Name" } }; return items; } }, ... diff: /**SCHEMA_DIFF*/[ ... { "operation": "insert", "parentName": "TabMTFInfosCandidatTabLabelGridLayoutd7450211", "propertyName": "items", "name": "UsrComboBox", "values": { "className": "Terrasoft.MultiChoiceCombobox", "layout": { "colSpan": 12, "rowSpan": 2, "column": 0, "row": 0, "layoutName": "TabMTFInfosCandidatTabLabelGridLayoutd7450211" }, "bindTo": "UsrComboBox", "dataValueType": Terrasoft.DataValueType.ENUM, "labelConfig": { "caption": "Test ComboBox" } }, }, ... ]/**SCHEMA_DIFF*/ }; });
"UsrComboBox" is an attribute I created in the attributes of this schema.
"MTF_Candidat" is an object that I created in the page wizard.
"Lkp_Francais" is the field ID for a lookup already defined in the page wizard. By default when I created Lkp_Francais, the connected lookup is "MTFcompetenceslinguistiques".
"MTFcompetenceslinguistiques" is a basic lookup with only the inherited fields
It produces this combobox :
The UI part it works fine :
But if I save my object, close it and reopen it, the data previously filled in the combobox are no longer there:
I tried to generate the source code for all the modified schemas in the advanced settings, then I recompiled everything and it still doesn't work.
Do you have any idea what is going on and what I can do to solve this problem?
EDIT : in my getMultiChoiceEntitiesConfig method I tried to change
mainColumnName: "Lkp_Francais"
to
mainColumnName: "Id"
as recommanded in https://marketplace.creatio.com/app/multiple-choice-field-setup-creatio under the installation part and this time when I save my object it just load indefinitely. I tried to change it to "MTFContactCandidat" which is a lookup connected to a Contact object and the result was the same,when I click on save it loads indefinitely.
Best regards,
Julien G.
Like
Hi Julien,
This add on should work with a detail which linked with your main entity (MTF_Candidat) and the lookup (MTFcompetenceslinguistiques).
According to the information you mentioned, you only have a field in the MTF_Candidat which linked to MTFcompetenceslinguistiques.
Therefore, you need change your design by creating a detail which allows you to store multiple records from the lookup and link to the main object.
After that your item configuration should be something like this:
items = { UsrComboBox: { mainEntitySchemaName: "DetailObject", //Detail Object code mainColumnName: "ColumnConnectedToMainObject", //The column in the created detail which link to MTF_Candidat. relatedEntitySchemaName: "MTFcompetenceslinguistiques", //Lookup object,Your configuration is Correct. relatedColumnName: "ColumnConnectedToLookup" //The column in the created detail which link to MTFcompetenceslinguistiques } };
regards,
Cheng Gong
Hi Julien,
This add on should work with a detail which linked with your main entity (MTF_Candidat) and the lookup (MTFcompetenceslinguistiques).
According to the information you mentioned, you only have a field in the MTF_Candidat which linked to MTFcompetenceslinguistiques.
Therefore, you need change your design by creating a detail which allows you to store multiple records from the lookup and link to the main object.
After that your item configuration should be something like this:
items = { UsrComboBox: { mainEntitySchemaName: "DetailObject", //Detail Object code mainColumnName: "ColumnConnectedToMainObject", //The column in the created detail which link to MTF_Candidat. relatedEntitySchemaName: "MTFcompetenceslinguistiques", //Lookup object,Your configuration is Correct. relatedColumnName: "ColumnConnectedToLookup" //The column in the created detail which link to MTFcompetenceslinguistiques } };
regards,
Cheng Gong