Hi community, 



I have created a detail and now I wanted to convert the detail into an editable list. The option that is provided in the detail setup is disabled. Then I added the required code in the client module. The detail has been converted to editable list but when I click on the record it is throwing the following error. 

The details regarding the issue are attached below.

Could you let me know how can I convert an already existing detail to an editable one?





Thanks in advance

Goparna Nasina.

Like 0

Like

1 comments

Hello,

 

Could you please provide the code you added and specify where exactly it was added?

 

Best regards,

Yuliya

Show all comments

Hey Community,



I'm stuck with problem trying to apply detail business rule on my edit grid. So the problem that business rule is looking to UsrParent.UsrStatus column. And i have the error that this column was deleted or renamed.

I've tried some solutions on Community but nothing is working for me. 

Here is my code:

		methods: {
			onActiveRowAction: function(buttonTag, primaryColumnValue) {
				this.mixins.ConfigurationGridUtilitiesV2.onActiveRowAction.call(this, buttonTag, primaryColumnValue);
			},
 
			generateActiveRowControlsConfig: function(id, columnsConfig, rowConfig) {
				//var gridDataColumns = getGridDataColumns();
				this.columnsConfig = columnsConfig;
				var gridLayoutItems = [];
				var currentColumnIndex = 0;
				this.Terrasoft.each(columnsConfig, function(columnConfig) {
					var cellConfig = this.getActiveRowCellConfig(columnConfig, currentColumnIndex);
       			 if (!cellConfig.hasOwnProperty("isNotFound")) {
            		gridLayoutItems.push(cellConfig);
        		}
					currentColumnIndex += cellConfig.layout.colSpan;
				}, this);
				this.applyBusinessRulesForActiveRow(id, gridLayoutItems);
				var viewGenerator = this.Ext.create(this.getRowViewGeneratorClassName());
				viewGenerator.viewModelClass = this;
				var gridLayoutConfig = viewGenerator.generateGridLayout({
					name: this.name,
					items: gridLayoutItems
				});
				rowConfig.push(gridLayoutConfig);
			},
 
				getGridDataColumns: function() {
                var baseGridDataColumns = this.callParent(arguments);
                var gridDataColumns = {
                    "UsrParent.UsrStatus": {path: "UsrParent.UsrStatus"},
                };
                return Ext.apply(baseGridDataColumns, gridDataColumns);
            }
 
},





thanks!

 

Like 0

Like

5 comments

Hi,

 

Do you add this business rule to the grid schema or to the detail edit page schema? Business rules added to the edit page should work properly without this error.

 

Alternatively try this approach with lookupListConfig in either grid schema and edit page schema of the detail (added to the schema attributes):

"UsrParent": {
                    "dataValueType": this.Terrasoft.DataValueType.LOOKUP,
                    "lookupListConfig": {
                        "columns": ["UsrStatus"]
                    }
                },

this should also get the value (and load itself) of the UsrStatus column.

Oleg Drobina,

Hi!



Thanks for ur answer, i already tried this one added in schema detail/page and still the same issue.

Also copied business-rules from page to detail schema.



Here is full code for Detail schema 

define("RdtSchema670160a3Detail", ["ConfigurationGrid", "ConfigurationGridGenerator",
	"ConfigurationGridUtilitiesV2"], function() {
	return {
		entitySchemaName: "RdtProductionRawProducts",
		attributes: {
			"IsEditable": {
				dataValueType: Terrasoft.DataValueType.BOOLEAN,
				type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
				value: true
			},
 
 
			"RdtProduction": {
                    "dataValueType": this.Terrasoft.DataValueType.LOOKUP,
                    "lookupListConfig": {
                        "columns": ["RdtStatus"]
                    }
                }
		},
		mixins: {
			ConfigurationGridUtilitiesV2: "Terrasoft.ConfigurationGridUtilitiesV2"
		},
		businessRules: /**SCHEMA_BUSINESS_RULES*/{
			"RdtRawProduct": {
				"a51ae6d8-b23d-4245-a06f-6f81a6a20f0d": {
					"uId": "a51ae6d8-b23d-4245-a06f-6f81a6a20f0d",
					"enabled": true,
					"removed": false,
					"ruleType": 1,
					"baseAttributePatch": "RdtType",
					"comparisonType": 3,
					"autoClean": false,
					"autocomplete": false,
					"type": 0,
					"value": "0e937c72-3826-40c0-ac62-30d70746cea0",
					"dataValueType": 10
				},
				"7864a234-ef49-4a9c-ac19-9967fb5b255a": {
					"uId": "7864a234-ef49-4a9c-ac19-9967fb5b255a",
					"enabled": true,
					"removed": false,
					"ruleType": 0,
					"property": 1,
					"logical": 0,
					"conditions": [
						{
							"comparisonType": 3,
							"leftExpression": {
								"type": 1,
								"attribute": "RdtProduction",
								"attributePath": "RdtStatus"
							},
							"rightExpression": {
								"type": 0,
								"value": "22c74599-4c04-401e-8dfd-06fde8f8cb81",
								"dataValueType": 10
							}
						}
					]
				}
			},
			"RdtQuantity": {
				"00b698f4-7e53-4a6b-804f-3a2f40e7b015": {
					"uId": "00b698f4-7e53-4a6b-804f-3a2f40e7b015",
					"enabled": true,
					"removed": false,
					"ruleType": 0,
					"property": 1,
					"logical": 0,
					"conditions": [
						{
							"comparisonType": 3,
							"leftExpression": {
								"type": 1,
								"attribute": "RdtProduction",
								"attributePath": "RdtStatus"
							},
							"rightExpression": {
								"type": 0,
								"value": "22c74599-4c04-401e-8dfd-06fde8f8cb81",
								"dataValueType": 10
							}
						}
					]
				}
			},
			"RdtUnit": {
				"825f4f2a-f110-4554-9a83-575440727c00": {
					"uId": "825f4f2a-f110-4554-9a83-575440727c00",
					"enabled": true,
					"removed": false,
					"ruleType": 0,
					"property": 1,
					"logical": 0,
					"conditions": [
						{
							"comparisonType": 3,
							"leftExpression": {
								"type": 1,
								"attribute": "RdtProduction",
								"attributePath": "RdtStatus"
							},
							"rightExpression": {
								"type": 0,
								"value": "22c74599-4c04-401e-8dfd-06fde8f8cb81",
								"dataValueType": 10
							}
						}
					]
				}
			},
			"RdtAvailableStock": {
				"843f04c6-f4c7-426c-85f3-5560b2383db5": {
					"uId": "843f04c6-f4c7-426c-85f3-5560b2383db5",
					"enabled": true,
					"removed": false,
					"ruleType": 0,
					"property": 1,
					"logical": 0,
					"conditions": [
						{
							"comparisonType": 1,
							"leftExpression": {
								"type": 1,
								"attribute": "RdtAvailableStock"
							}
						}
					]
				}
			},
			"RdtNotEnoughStock": {
				"7dccf940-c42c-4b5d-82ab-acff711c7893": {
					"uId": "7dccf940-c42c-4b5d-82ab-acff711c7893",
					"enabled": true,
					"removed": false,
					"ruleType": 0,
					"property": 1,
					"logical": 0,
					"conditions": [
						{
							"comparisonType": 1,
							"leftExpression": {
								"type": 1,
								"attribute": "RdtProduction"
							}
						}
					]
				}
			}
		}/**SCHEMA_BUSINESS_RULES*/,
		methods: {
			onActiveRowAction: function(buttonTag, primaryColumnValue) {
				this.mixins.ConfigurationGridUtilitiesV2.onActiveRowAction.call(this, buttonTag, primaryColumnValue);
			},
 
			generateActiveRowControlsConfig: function(id, columnsConfig, rowConfig) {
				this.columnsConfig = columnsConfig;
				var gridLayoutItems = [];
				var currentColumnIndex = 0;
				this.Terrasoft.each(columnsConfig, function(columnConfig) {
					var cellConfig = this.getActiveRowCellConfig(columnConfig, currentColumnIndex);
       			 if (!cellConfig.hasOwnProperty("isNotFound")) {
            		gridLayoutItems.push(cellConfig);
        		}
					currentColumnIndex += cellConfig.layout.colSpan;
				}, this);
				this.applyBusinessRulesForActiveRow(id, gridLayoutItems);
				var viewGenerator = this.Ext.create(this.getRowViewGeneratorClassName());
				viewGenerator.viewModelClass = this;
				var gridLayoutConfig = viewGenerator.generateGridLayout({
					name: this.name,
					items: gridLayoutItems
				});
				rowConfig.push(gridLayoutConfig);
			}
		},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "merge",
				"name": "DataGrid",
				"values": {
					"className": "Terrasoft.ConfigurationGrid",
					"generator": "ConfigurationGridGenerator.generatePartial",
					"generateControlsConfig": {"bindTo": "generateActiveRowControlsConfig"},
					"changeRow": {"bindTo": "changeRow"},
					"unSelectRow": {"bindTo": "unSelectRow"},
					"onGridClick": {"bindTo": "onGridClick"},
					"activeRowActions": [
						{
							"className": "Terrasoft.Button",
							"style": this.Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
							"tag": "save",
							"markerValue": "save",
							"imageConfig": {"bindTo": "Resources.Images.SaveIcon"}
						},
						{
							"className": "Terrasoft.Button",
							"style": this.Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
							"tag": "cancel",
							"markerValue": "cancel",
							"imageConfig": {"bindTo": "Resources.Images.CancelIcon"}
						},
						{
							"className": "Terrasoft.Button",
							"style": this.Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
							"tag": "card",
							"markerValue": "card",
							"imageConfig": {"bindTo": "Resources.Images.CardIcon"}
						},
						{
							"className": "Terrasoft.Button",
							"style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
							"tag": "copy",
							"markerValue": "copy",
							"imageConfig": {"bindTo": "Resources.Images.CopyIcon"}
						},
						{
							"className": "Terrasoft.Button",
							"style": this.Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
							"tag": "remove",
							"markerValue": "remove",
							"imageConfig": {"bindTo": "Resources.Images.RemoveIcon"}
						}
					],
					"initActiveRowKeyMap": {"bindTo": "initActiveRowKeyMap"},
					"activeRowAction": {"bindTo": "onActiveRowAction"},
					"multiSelect": {"bindTo": "MultiSelect"}
				}
			}
		]/**SCHEMA_DIFF*/
	};
});

Maybe u have other ideas? 



Much thanks!

Oleksii

Oleksii Protsiuk,

 

Ok, and can you please point me to the business rule from your code that references the UsrParent.UsrStatus column (or is it RdtStatus in the code above)? And also please share the edit page code.

Oleg Drobina,

1. Business rule for RdtQuantity for example.

2. Yes, its RdtStatus.



3. 

define("RdtSchemafaf34ef3Page", [], function() {
	return {
		entitySchemaName: "RdtProductionRawProducts",
		attributes: {
					"RdtProduction": {
                    "dataValueType": this.Terrasoft.DataValueType.LOOKUP,
                    "lookupListConfig": {
                        "columns": ["RdtStatus"]
                    }
                }
		},
		modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		businessRules: /**SCHEMA_BUSINESS_RULES*/{
			"RdtRawProduct": {
				"a51ae6d8-b23d-4245-a06f-6f81a6a20f0d": {
					"uId": "a51ae6d8-b23d-4245-a06f-6f81a6a20f0d",
					"enabled": true,
					"removed": false,
					"ruleType": 1,
					"baseAttributePatch": "RdtType",
					"comparisonType": 3,
					"autoClean": false,
					"autocomplete": false,
					"type": 0,
					"value": "0e937c72-3826-40c0-ac62-30d70746cea0",
					"dataValueType": 10
				},
				"7864a234-ef49-4a9c-ac19-9967fb5b255a": {
					"uId": "7864a234-ef49-4a9c-ac19-9967fb5b255a",
					"enabled": true,
					"removed": false,
					"ruleType": 0,
					"property": 1,
					"logical": 0,
					"conditions": [
						{
							"comparisonType": 3,
							"leftExpression": {
								"type": 1,
								"attribute": "RdtProduction",
								"attributePath": "RdtStatus"
							},
							"rightExpression": {
								"type": 0,
								"value": "22c74599-4c04-401e-8dfd-06fde8f8cb81",
								"dataValueType": 10
							}
						}
					]
				}
			},
			"RdtQuantity": {
				"00b698f4-7e53-4a6b-804f-3a2f40e7b015": {
					"uId": "00b698f4-7e53-4a6b-804f-3a2f40e7b015",
					"enabled": true,
					"removed": false,
					"ruleType": 0,
					"property": 1,
					"logical": 0,
					"conditions": [
						{
							"comparisonType": 3,
							"leftExpression": {
								"type": 1,
								"attribute": "RdtProduction",
								"attributePath": "RdtStatus"
							},
							"rightExpression": {
								"type": 0,
								"value": "22c74599-4c04-401e-8dfd-06fde8f8cb81",
								"dataValueType": 10
							}
						}
					]
				}
			},
			"RdtUnit": {
				"825f4f2a-f110-4554-9a83-575440727c00": {
					"uId": "825f4f2a-f110-4554-9a83-575440727c00",
					"enabled": true,
					"removed": false,
					"ruleType": 0,
					"property": 1,
					"logical": 0,
					"conditions": [
						{
							"comparisonType": 3,
							"leftExpression": {
								"type": 1,
								"attribute": "RdtProduction",
								"attributePath": "RdtStatus"
							},
							"rightExpression": {
								"type": 0,
								"value": "22c74599-4c04-401e-8dfd-06fde8f8cb81",
								"dataValueType": 10
							}
						}
					]
				}
			},
			"RdtAvailableStock": {
				"843f04c6-f4c7-426c-85f3-5560b2383db5": {
					"uId": "843f04c6-f4c7-426c-85f3-5560b2383db5",
					"enabled": true,
					"removed": false,
					"ruleType": 0,
					"property": 1,
					"logical": 0,
					"conditions": [
						{
							"comparisonType": 1,
							"leftExpression": {
								"type": 1,
								"attribute": "RdtAvailableStock"
							}
						}
					]
				}
			},
			"RdtNotEnoughStock": {
				"7dccf940-c42c-4b5d-82ab-acff711c7893": {
					"uId": "7dccf940-c42c-4b5d-82ab-acff711c7893",
					"enabled": true,
					"removed": false,
					"ruleType": 0,
					"property": 1,
					"logical": 0,
					"conditions": [
						{
							"comparisonType": 1,
							"leftExpression": {
								"type": 1,
								"attribute": "RdtProduction"
							}
						}
					]
				}
			}
		}/**SCHEMA_BUSINESS_RULES*/,
		methods: {},
		dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "LOOKUPa8ab8309-ec3e-4f7b-b007-af2483101fee",
				"values": {
					"layout": {
						"colSpan": 12,
						"rowSpan": 1,
						"column": 0,
						"row": 0,
						"layoutName": "Header"
					},
					"bindTo": "RdtRawProduct",
					"enabled": false,
					"contentType": 5
				},
				"parentName": "Header",
				"propertyName": "items",
				"index": 0
			},
			{
				"operation": "insert",
				"name": "LOOKUPe030f444-90d1-4d98-b476-b4b576c4f122",
				"values": {
					"layout": {
						"colSpan": 12,
						"rowSpan": 1,
						"column": 12,
						"row": 0,
						"layoutName": "Header"
					},
					"bindTo": "RdtUnit",
					"enabled": false,
					"contentType": 5
				},
				"parentName": "Header",
				"propertyName": "items",
				"index": 1
			},
			{
				"operation": "insert",
				"name": "FLOAT07d52071-3119-4f71-a45f-3e8701a3e127",
				"values": {
					"layout": {
						"colSpan": 12,
						"rowSpan": 1,
						"column": 0,
						"row": 1,
						"layoutName": "Header"
					},
					"bindTo": "RdtQuantity",
					"enabled": false
				},
				"parentName": "Header",
				"propertyName": "items",
				"index": 2
			},
			{
				"operation": "insert",
				"name": "RdtAvailableStockbd49a463-5f7d-4a67-aaa6-f01f7cca4cd9",
				"values": {
					"layout": {
						"colSpan": 12,
						"rowSpan": 1,
						"column": 12,
						"row": 1,
						"layoutName": "Header"
					},
					"bindTo": "RdtAvailableStock",
					"enabled": false
				},
				"parentName": "Header",
				"propertyName": "items",
				"index": 3
			},
			{
				"operation": "insert",
				"name": "RdtNotEnoughStockb7a3c879-7054-4bf6-8434-adb226c77730",
				"values": {
					"layout": {
						"colSpan": 12,
						"rowSpan": 1,
						"column": 0,
						"row": 2,
						"layoutName": "Header"
					},
					"bindTo": "RdtNotEnoughStock",
					"enabled": false
				},
				"parentName": "Header",
				"propertyName": "items",
				"index": 4
			}
		]/**SCHEMA_DIFF*/
	};
});



 

The same problem with setting the value of the field using connected entity column on the different detail.

1. The field value is showing on field

2. After save the same error and the field is empty.





Is there any chance to fix this error ?



Thanks!

Show all comments

Hi Creatio Community,

 

I would like to know the name of the function/handler that's called when creating a record and saving it in an editable detail in FreedomUI so that we can override it. We also noticed SaveRecordRequest doesn't seem to be called here.

 

Thanks in advance.

 

Regards,

Abilash.S

Like 0

Like

4 comments

Hello,

 

These should be the crt.CreateRecordRequest request and the crt.CreateRecordHandler handler. Try those in either:

 

1) Page where detail is added

2) Detail schema

3) Edit page of the detail

 

and it should be triggered.

Oleg Drobina,

 

Tried these two methods. They don't seem to be called when creating and saving the records in an editable detail.

Abilash,



I tried this handler:

handlers: /**SCHEMA_HANDLERS*/[
			{
				request: "crt.CreateRecordRequest",
				handler: async (request, next) => {
					return next?.handle(request);
				}
			}
		]/**SCHEMA_HANDLERS*/,

on the schema where detail is added and it's successfully triggered:

It also depends on which handler you have specified in the "Add button" properties, you need to find it in the schema diff (in my case it was crt.CreateRecordRequest):

{
				"operation": "insert",
				"name": "GridDetailAddBtn_z5e8jja",
				"values": {
					"type": "crt.Button",
					"caption": "#ResourceString(GridDetailAddBtn_z5e8jja_caption)#",
					"icon": "add-button-icon",
					"iconPosition": "only-icon",
					"color": "default",
					"size": "medium",
					"clicked": {
						"request": "crt.CreateRecordRequest",
						"params": {
							"entityName": "Contact"
						}
					},
					"visible": true,
					"clickMode": "default"
				},
				"parentName": "FlexContainer_n5yrzkv",
				"propertyName": "items",
				"index": 0
			},

 

Oleg Drobina,

 

The detail we are working with uses an inline record to create new records which doesn't seem to be calling CreateRecordHandler or CreateRecordRequest. 











 

Show all comments

Hello Community, 

 

I have a requirement to validate a Column in the editable detail.

How can we achieve this? I tried using validators with the column name of Datagrid. But it didn't worked.

 Any suggestions is really helpful. 

 

Thanks

Gargeyi.G

File attachments
Like 0

Like

3 comments

Hello,

In order to add validation to an editable detail you need to override the method save() in the detail page, for example:

define("UsrSchema1051cea3Page", [], function() {
	return {
		entitySchemaName: "UsrTestDetObj",
		attributes: {},
		modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,
		methods: {
			save: function() {
                    if (this.get("UsrName") == "1") {
                        this.callParent(arguments);
                    } else {
                        this.showInformationDialog("UsrName should be 1 ");
                    }
                }
		},
		dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
	};
});

 

Hello, 

 

Thankyou for your response, 

But I wanted to validate columns in the detail,

I don't open the detail page and so I don't want to validate in the detail page but in the inline record.

please find attached screenshot

Hi,

This example is working on a detail itself.

With it, you cannot save the record unless the condition is met.

Considering the fact that detail fields are virtually generated, this is the best option to add validation.

Show all comments

Hello Community, 

 

I would like to know how we can add a new record in the editable detail in a form page without opening a new page on click of '+' icon in freedom UI. Now on click of '+' icon it opens a new page to add the record. 

 

Thanks

Gargeyi.G

 

 

Like 0

Like

1 comments

Hello!

 

As for now, this is the correct behavior of the system - there is a page opened and you have to fill the fields to have it added to the detail.

Our development team is already working on updating the application to implement the inline record adding. So hopefully, this functionality will be available in the nearest releases.

Thank you for this suggestion, this helps to make our product better!

 

Best regards,

Kate

Show all comments

 

Like 1

Like

1 comments
Best reply

Hello Jerome,



The behavior you describe is not an error and corresponds to the basic logic that is inherent in all fields. If the field has the "Required" property and the field type is Number or Fractional, then a value of 0 or 0.00 is an empty value, that is, the field is not filled. Thus, when you try to save a card with 0.00 in a numeric field with the required property, the system will display a message that the field must be filled with a value. The values ​​0 or 0.00 is an empty values, they are displayed in empty fields so that users can visually understand the format of the field. We recommend you remove the mandatory filling from the required field so that you can save the card with a zero value in the field. We will broadcast the information received from you to the development team to consider the possibility of changing the logic of the mandatory filling of numeric fields.



Best Regards,

Kate

Hello Jerome,



The behavior you describe is not an error and corresponds to the basic logic that is inherent in all fields. If the field has the "Required" property and the field type is Number or Fractional, then a value of 0 or 0.00 is an empty value, that is, the field is not filled. Thus, when you try to save a card with 0.00 in a numeric field with the required property, the system will display a message that the field must be filled with a value. The values ​​0 or 0.00 is an empty values, they are displayed in empty fields so that users can visually understand the format of the field. We recommend you remove the mandatory filling from the required field so that you can save the card with a zero value in the field. We will broadcast the information received from you to the development team to consider the possibility of changing the logic of the mandatory filling of numeric fields.



Best Regards,

Kate

Show all comments

 Hi community,

I'm trying to disable the columns of an editable detail to make them read only and I have read many articles about it, but I'm still having a problem that I can't fix.



I wrote this code in the GridDetail to disable the fields but I noticed that for some of the columns of the detail is not working.

getCellControlsConfig: function(entitySchemaColumn) {
    if (!entitySchemaColumn) {
        return;
    }
    var columnName = entitySchemaColumn.name;
    var enabled = (entitySchemaColumn.usageType !== this.Terrasoft.EntitySchemaColumnUsageType.None) &&
        !this.Ext.Array.contains(this.systemColumns, columnName);
    var config = {
        itemType: this.Terrasoft.ViewItemType.MODEL_ITEM,
        name: columnName,
        labelConfig: {visible: false},
        caption: entitySchemaColumn.caption,
        enabled: enabled
    };
    if (!this.values.IsEnabled) {
        config.enabled = false;
        //config.labelConfig.enabled = false;
        //this.set("Is"+columnName+"enabled", false);
    }
    if (entitySchemaColumn.dataValueType === this.Terrasoft.DataValueType.LOOKUP) {
        config.showValueAsLink = false;
    }
    if (entitySchemaColumn.dataValueType !== this.Terrasoft.DataValueType.DATE_TIME &&
        entitySchemaColumn.dataValueType !== this.Terrasoft.DataValueType.BOOLEAN) {
        config.focused = {"bindTo": "Is" + columnName + "Focused"};
    }
    console.log(config);
    return config;
},

Debugging I have discovered that the detail adds to the labelConfig the property "enabled" which is binded to an attribute ("isProductenabled").

I tried to force the property writing it in the method and I also tried to set the attribute manually, but it's not working... do you have any idea?



Let me know.

Thanks in advance.



Best regards,

Luca

Like 0

Like

5 comments
Best reply

Luca Tavasanis,

While I was debugging I have noticed that the properties of the labelConfig that enabled some of the fields where added in the method: "applyBusinessRulesForActiveRow: function(id, gridLayoutItems)" and to fix the issue I just added this method in the client module.

You can lock the fields in the editable detail using business rules on the page for the detail, rather than in code. On the page for the detail, add a business rule to make the field not editable. Something like 

Condition: Boolean true = Boolean false (something that is never true)

Then: Make field editable (the condition is never true, so field is never editable)

The business rule will apply to the detail list and the fields will not be editable in the detail list.

Ryan

Hi Ryan,

I'm actually working with the BaseGridDetail so I can't lock it with a business rule... do you have any other idea?

 

Thanks anyway.

Luca

Luca Tavasanis,

IIRC to do it in code I usually do it like this (but unable to verify if this is correct at the moment)

getCellControlsConfig: function(entitySchemaColumn) {
    // get config from base 
    var config = this.callParent(arguments);
    var columnName = entitySchemaColumn.name;
 
    // if this is the column I want to disable
    if (columnName === "UsrMyColumn") {
        Ext.apply(config, {
            enabled: false
        });
    }
 
    return config;
}

Hopefully that gets you closer, of course, if you're wanting to disable all, you could just remove the if to check the column it's for.

Ryan

Ryan Farley,

I just tried what you suggested but unfortunately it's not working... it returns an error when I use this.callParent(arguments);.

Thank you anyway.



Luca

Luca Tavasanis,

While I was debugging I have noticed that the properties of the labelConfig that enabled some of the fields where added in the method: "applyBusinessRulesForActiveRow: function(id, gridLayoutItems)" and to fix the issue I just added this method in the client module.

Show all comments

Hi Team,

 

There is an issue we are facing . In the below screen shot , we are opening the edit page via business process but in the normal detail when we add detail records it first saves the parent record which also provides an error if mandatory fields are not filled in . The same functionality is not working in GRID view . Any Idea?

Regards,

Sethuraghav N

Like 0

Like

3 comments

Hello,

 

This is the base logic of the application. You cannot add a record to a detail unless all of the required fields of the object are filled in. I would suggest filling in the required field first or making it not required.

 

Best regards,

Max.

Max,

Hi Max , The problem here is It allowed me to add the record . You can see it in the screenshot where i added the record without filling the mandatory. This is only in the case of editable list 

Sethu Raghav,

Sorry, I misunderstood your question. In this case it would need a deeper investigation. I can see that there is a case SR-01035273 created for this issue and our support team is already working on it!

Show all comments

Dear Community,

 

I have found multiple posts on how to remove the "+" button on the event audience detail in the event section.

We have created a process where people can add an audience but they're not supposed to use the + (add) button on the detail itself.

 

Does anyone have a solution/experience with removing the "+" from the event audience detail? I have succeeded in removing the "+" from other details, but this one seems to be different.

 

Any help or info will be appreciated!

 

Kind regards,

Yosef

Like 0

Like

2 comments
Best reply

Hello Yosef,

To remove the add button on the event audience detail, add the following to the diff in EventTargetDetailV2

diff: /**SCHEMA_DIFF*/[
	{
		"operation": "remove",
		"name": "AddTypedRecordButton"
	}
]/**SCHEMA_DIFF*/

Ryan

Hello Yosef,

To remove the add button on the event audience detail, add the following to the diff in EventTargetDetailV2

diff: /**SCHEMA_DIFF*/[
	{
		"operation": "remove",
		"name": "AddTypedRecordButton"
	}
]/**SCHEMA_DIFF*/

Ryan

Hello Ryan,

 

This seems to work perfectly, thank you!

Show all comments

Hi Team,



I would like to perform an operation on the change of a field in editable detail.

But the onchnage event doesn't trigger.

 

Step 1: Below  is the editable detail, when the value in document field is changed an operation has to be performed (custom logic)



Step 2: Updated the below code in this schema UsrCourierCertDetail (Title: Detail schema: "Acceptance certificates")

attributes:{
   "UsrDocument": {
				dependencies: [{
				  columns: ["UsrDocument"], //field to trigger change event for
				  methodName: "onDocumentchange" //method to execute
				}]
			}
}
 
 
	onDocumentchange :  function(){
            	this.console.log("document chnged")	;
            },
 

but, this Ondocumentchange() is not triggered when the value in document field (UsrDocument) is modified.



kindly guide me on this.





Regards,

Bhoobalan P.

Like 0

Like

4 comments
Best reply

Add the change events to the page for the detail, not in the detail - even though this is an editable detail. It should work if added there. 

Ryan

Add the change events to the page for the detail, not in the detail - even though this is an editable detail. It should work if added there. 

Ryan

Hi Bhoobalan, 



Please follow Ryan's answer, we tested this implementation and it actually works.

 

Best Regards, 

 

Bogdan L.

Ryan Farley,

Thanks for the response and it worked.

Bogdan Lesyk,

Thanks, I followed the implementation on the page for the detail. It worked.

Show all comments