Issue with DisableControlsGenerator opening page from a detail
Hello,
We try to use Locking edit page fields tool to lock a page with specific condition.
When user opens the page from a Section (e.g. Orders), it works correctly - all fields and details are locked.
But when user opens the same page from a detail (e.g. Account/History/Orders) - all fields and details are not locked, so DisableControlsGenerator doesn't work
Does anyone has solution or idea how to fix this?
Thank you!
Like
Try below code and let me know if it works.
attributes: {
"IsModelItemsEnabled": {
"dataValueType": Terrasoft.DataValueType.BOOLEAN,
"value": true
},
onEntityInitialized: function() {
this.callParent(arguments);
this.set("IsModelItemsEnabled", false);
},
diff: /**SCHEMA_DIFF*/[
{
"operation": "merge",
"name": "CardContentWrapper",
"values": {
"generator": "DisableControlsGenerator.generatePartial"
}
},
Hello,
I've run into a small test by displaying the configuration items detail on the contact page and by applying fields locking on the configuration item page. When opening the configuration item from the detail located on the contact page the fields are locked. So the issue is that the conditions that you use to lock the page are not working as they should.
Oleg Drobina,
We use no condition for the test on ContractPageV2:
attributes: {
"IsModelItemsEnabled": {
"dataValueType": Terrasoft.DataValueType.BOOLEAN,
"value": false
},
diff: /**SCHEMA_DIFF*/[
{
"operation": "merge",
"name": "CardContentWrapper",
"values": {
"generator": "DisableControlsGenerator.generatePartial"
}
},
I've tested on demo environment with 3 sections: Contract, Document and custom Test section. The same result for all of them
Try below code and let me know if it works.
attributes: {
"IsModelItemsEnabled": {
"dataValueType": Terrasoft.DataValueType.BOOLEAN,
"value": true
},
onEntityInitialized: function() {
this.callParent(arguments);
this.set("IsModelItemsEnabled", false);
},
diff: /**SCHEMA_DIFF*/[
{
"operation": "merge",
"name": "CardContentWrapper",
"values": {
"generator": "DisableControlsGenerator.generatePartial"
}
},
Vladimir Sokolov,
I was also able to reproduce it for Contracts, will contact our R&D department for clarifications and return to you once I receive any feedback from them.
Oleg Drobina,
Besides, I've found, that this doesn't lock 'Connected to' fields in Document: