Question

Not getting Multiple choice field setup for Creatio to save value

Hello. I'm working with the Multiple choice field setup for Creatio (https://marketplace.creatio.com/app/multiple-choice-field-setup-creatio) add-on but I'm not getting it to save the selected values.

 

I've followed the guide here: https://marketplace.creatio.com/sites/marketplace/files/app-guide/Multi…

 

I have the Lookup object that I select. I have the link table (which is equivolent to ActivityParticipant which is used in the guide-example)

 

I get the values correctly on the page, and they are selectable. But nothing is saved to the database when i Save the record

 

Object: Contact

Lookup: ChessInterest

Link-object: ChessContactInterest

define("ContactPageV2", ["MultiChoiceMixin"], function() {
	return {
      entitySchemaName: "Contact",
      attributes: {
        "ChessInterests": {"dataValueType": Terrasoft.DataValueType.LOOKUP}
      },
      mixins: {MultiChoiceMixin: "Terrasoft.MultiChoiceMixin"},
      modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
		}
 
...
methods: {
		init: function() {
          this.callParent(arguments);
          this.mixins.MultiChoiceMixin.init.call(this, arguments);
        },
        getMultiChoiceEntitiesConfig: function () {
          const items = {
            ChessInterests: {
              mainEntitySchemaName: "ChessContactInterest",
              mainColumnName: "Contact",
              relatedEntitySchemaName: "ChessInterest",
              relatedColumnName: "ChessInterest"
            }
          };
          return items;
        }
      },
 
...
 
      diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "ChessInterests",
				"values": {
					"className": "Terrasoft.MultiChoiceCombobox",
					"bindTo": "ChessInterests",
					"dataValueType": 11,
					"layout": {
						"colSpan": 12,
						"rowSpan": 1,
						"column": 0,
						"row": 5
					},
					"labelConfig": {
						"caption": "Select interests"
					}
				},
				"parentName": "Header",
				"propertyName": "items",
				"index": 0
			},
}



 

Like 0

Like

9 comments
Best reply

Fixed it with another one. Last one was wrong

              mainEntitySchemaName: "ChessContactInterest",
              mainColumnName: "ChessContact",
              relatedEntitySchemaName: "ChessInterest",
              relatedColumnName: "ChessInterest"

Explanation as I understand it:

mainEntitySchemaName: "My Link Table",
mainColumnName: "Property in Link table matching current record Id (In my case ContactId)", 
relatedEntitySchemaName: "Object to select", 
relatedColumnName: "Objects column name in Link table"

Bumping this

Hi Julius,

 

I recommend double-checking the following parameters: mainEntitySchemaName, mainColumnName, and relatedColumnName. They all are responsible for data storage.

 

Also, could you please provide a screenshot of the settings for the 'ChessContactInterest' object with added fields? This would help investigate the issue further.

Alexander Demidov,

Alexander Demidov,

I managed to solve it.

        getMultiChoiceEntitiesConfig: function () {
          const items = {
            ChessInterests: {
              mainEntitySchemaName: "ChessContactInterest",
              mainColumnName: "ChessContact",
              relatedEntitySchemaName: "ChessContactInterest",
              relatedColumnName: "ChessInterest"
            }
          };

Now my next issue is that I don't have a Displayed Value on my link-object (ChessContactInterestChess). I can't select one in the drop-down

Fixed it with another one. Last one was wrong

              mainEntitySchemaName: "ChessContactInterest",
              mainColumnName: "ChessContact",
              relatedEntitySchemaName: "ChessInterest",
              relatedColumnName: "ChessInterest"

Explanation as I understand it:

mainEntitySchemaName: "My Link Table",
mainColumnName: "Property in Link table matching current record Id (In my case ContactId)", 
relatedEntitySchemaName: "Object to select", 
relatedColumnName: "Objects column name in Link table"

Hi Julius,

 

It's great to hear that you resolved these issues! We will add your findings to the app description to help streamline the field setup.

Hi,

I get this problem too, that values are not being saved.

I checked the above elements and they are good!

What else can cause that issue?

 

I managed to solve it.

I deleted the name field that was automatically created when I create the object through the detail wizard. It's required and probably that couldn't be save missing that field.

Hello. I'm working with the Multiple choice field setup for Creatio (https://marketplace.creatio.com/app/multiple-choice-field-setup-creatio) add-on but I'm not getting it to save the selected values.

I've followed the guide here: https://marketplace.creatio.com/sites/marketplace/files/app-guide/Multi…

I get the values correctly on the page, and they are selectable. But nothing is saved to the database when i Save the record

Object: UsrContactLabels

Lookup: UsrLabels

Link-object: UsrContact

Show all comments