Creating a Generic Model
In Eccentex AppBase, creating a generic model refers to the process of designing and building a flexible and adaptable data model that can be used as a foundation for various types of business objects or entities within an application.
A generic model in Eccentex AppBase allows you to define a set of common attributes, properties, and behaviors that can be shared across multiple business objects. This approach provides a standardized structure and consistency in organizing and managing data within the application.
Here are the key steps involved in creating a generic model in Eccentex AppBase:
- Identify Common Attributes: Determine the attributes that are shared among different business objects. These attributes represent the common properties or characteristics that various entities need to capture. For example, attributes like name, description, creation date, and status might be common across different business objects.
- Define Data Types: Assign appropriate data types to the attributes based on the nature of the data they will store. Data types can include text, number, date/time, Boolean, picklist, and others. Ensure that the data types accurately represent the kind of information that will be stored in each attribute.
- Establish Relationships: Determine the relationships between the generic model and other business objects or entities. This includes identifying one-to-one, one-to-many, or many-to-many relationships. Relationships help define the associations and dependencies between different objects and enable the retrieval of related data.
- Customize as Needed: While creating the generic model, you can customize it to accommodate specific requirements for individual business objects. This may involve adding additional attributes or modifying existing ones to capture object-specific information.
- Reuse the Generic Model: Once the generic model is created, it can be used as a blueprint or template for creating new business objects. By reusing the generic model, you can streamline the development process, ensure consistency in data management, and reduce the effort required to create and maintain multiple similar objects.
Creating a generic model in Eccentex AppBase establishes a foundation for building various business objects with shared attributes and behaviors. This approach promotes reusability, consistency, and scalability in application development, allowing you to efficiently manage and manipulate data across different entities within your application.
Steps
- On the top right, navigate to → <<your solution>>
- On the left, navigate to → Setup
- Navigate to Data Management → Data Models (1).
- Click on the New Data Model button (2).
- In the pop-up window, select the Parent Type as Generic.
- Insert a Name for the model. In our example, Car Vendors.
- The Permanent Code is populated based on the Name, it can be modified with no spaces.
- Enter a brief Description that explains the use.
- Save the new Data Model.
- The new model is shown in the Data Model Builder. As the alert indicates, we need to add at least one attribute to the model.
- This model can be enriched using the objects available in the left panel. In our example, we added two business objects: Model and Trim.
- To learn how to add a Dictionary to the model, see the Adding a Dictionary to a Data Model article.
- Check the Status Report and validate that this new model needs to be deployed.
- After a successful deployment, the next step is to create a Detail Page. See the Generic MDM Detail Page article on creating a detail page for this data model.