Unfortunately, it is not possible to make some detail mandatory for filling in with user. We registered this request and forwarded to our R&D team for consideration and implementation in future application releases.
It is possible to do with development though.
Here is a sample algorithm for how it may be done in Classic UI. Please not that the methods in the examples serve only for giving an idea of how this may be done and don't perform actual business task:
1) Create an ESQ to check if the detail has records added.
Example:
checkDetailRecords: function(){
var accountId =this.get("Id");
var select =this.Ext.create("Terrasoft.EntitySchemaQuery", {
rootSchemaName:"AccountAddress"//name of the detail object schema});
var esqFilter = select.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Account", accountId);
select.getEntityCollection(function(response){if(response.success){
var collection = result.collection;if(collection && collection.collection.length>0){this.set("DetailHasRecords", true);this.set("ESQCompleted", true);this.save();}else{this.set("DetailHasRecords", false);this.set("ESQCompleted", true);this.save();}}}, this);}
2) After checking if there are any records you would need to save the result, for example, to an attribute:
3) After that you can override save method for the opportunity to check if the detail is filled in when the opportunity in a specific stage
Example:
save: function(){if("ESQCompleted"){if("DetailHasRecords"){this.callParent();}else{this.showInformationDialog("Please fill in ....");}}else{this.checkDetailRecords();}}
Also to prevent the opportunity when record was deleted from the detail and no records in the detail left you can use the method onDetailChanged:
onDetailChanged: function(detail){this.callParent(arguments);if(detail.schemaName==="AccountAddress")//name of the detailthis.checkDetailRecords();}}