Model Forms for EnterpriseObject

Creating model form pages for Enterprise Objects is similar to regular models except the developer must always provide customModelName in the ModelInfo. For other models, the developer can provide either customModelName or modelLevelType. When modelLevelType is provided, platform uses the "Standard " definition which is useless for Enterprise Objects.

For example, the model form screen for a Book model name in EPT:

define(function() {
Ext.ns("EPT.SampleEnterprise");
EPT.SampleEnterprise.OfficeDetails = Ext.extend(One.model.ModelFormContainer,{
 
modelInfo: {customModelName: "EPT.SampleEnterprise.Office"}
,detailViewName: "EPT.SampleEnterpriseOfficeDetail"
,createActionName: "EPT.SampleEnterprise.CreateOffice"
});
 
});

And the accompanying GlobalRegistry.js entry:

One.PageMgr.regDetail('EnterpriseObject''EPT.SampleEnterprise.Office''EPT.SampleEnterprise.OfficeDetails');


Note how we use the 3-argument form of regDetail. This allows us to register this detail only for the "Office" subtype of EnterpriseObject, not for ALL EnterpriseObjects.

By default platform always hides ObjectKey and ModelName from CRUD screens:


images/download/attachments/144835283/enterprise_object_create_office-version-1-modificationdate-1645044048000-api-v2.png