You are here:
Business Object Contract Definition
Use the elements and attributes of the Business Object contract to model and define a custom object.
Required Editions
Available in: Lightning Experience Available in: Enterprise and Unlimited Editions that have Consumer Goods Cloud enabled |
| Attribute | Description | Value/Pattern | Required |
|---|---|---|---|
| name | Specifies the unique name of the business object. | String | Yes |
| platformObject | Specifies the object name for which quick actions are to be shown when these conditions are met:
|
String | No |
| generateLoadMethod | Specifies whether a loadAsync method should be generated for this BO:
|
Boolean. Default is false. | No |
| generateCreateMethod | Specifies whether a createAsync method should be generated for this BOs:
|
Boolean. Default is false. | No |
The sub nodes of a business contract are:
- DataSource: Required. DataSource references the data source that is specified for the BO. Each business object contract has one DataSource node. The name of the datasource is the only attribute of the DataSource node, and is required. The specified datasource name must exist in the model.For example: for the Promotion object with BusinessOject name=”BoPromotion”, <DataSource name="DsBoPromotion" />SimpleProperties - Binds the UI elements.
- SimpleProperties: Simple properties contain a list of simple properties (1..N) of the BO. See Simple Properties.
- ObjectLookups: Also known as a lookup object (LU), an object lookup delivers a list of read-only attributes that replace the PKey in the UI. See About Lookup Objects and How They Work.
- NestedObjects: Contains the nested business objects. Nested objects have a 1:1 relation with
other business objects. For example, the BoCall business object has a relation to the
BoJobManager business object.
You can use the nesting alias (name) to get access to the properties and methods of a nested object. For example, in a process:<NestedObjects> <NestedObject name="boJobManager" objectClass="BoJobManager" dataSourceProperty="pKey" nestingProperty="clbMainPKey" loadMode="LoadImmediate" /></NestedObjects><Action name="loadAndSetPrerequisites" actionType="LOGIC" call="ProcessContext::MainBO.boJobManager.loadAndSetPrerequisites"> - ListObjects: Binds a list to a business object. Contains a list of nested List Objects(0..n) of the business object.
- Methods: Use to declare all business object methods, including pre, post, and replace
methods. Contains the methods (0…n) of the Business Object. Business objects can have both
generated and customized methods. For
example,
For information about adding business logic contracts and the types of methods that are added to a business object, see Add Methods or Business Logic Contracts Automatically.<Methods> <Method name="beforeSaveAsync" /> <Method name="afterSaveAsync" /> <Method name="beforeLoadAsync" /> <Method name="afterLoadAsync" /></Methods> - Validations: Specifies the methods (business logic) that are used to validate the Business
Object. For
example,
<Validations> <Validation name="ValidateAsync" /></Validations>
Sample Business Object contract:
<BusinessObject name="BoMyNewBusinessObject" xmlns=".xsd" generateLoadMethod="false" generateCreateMethod="false" OERReference="" schemaVersion="1.1">
<DataSource name="DsBoMyNewBusinessObject" />
<SimpleProperties>
<SimpleProperty>
<Events>
<Event> </Event>
</Events>
</SimpleProperty>
</SimpleProperties>
<ObjectLookups>
<ObjectLookup> </ObjectLookup>
</ObjectLookups>
<NestedObjects>
<NestedObject> </NestedObject>
</NestedObjects>
<ListObjects>
<ListObject>
<Events>
<Event> </Event>
</Events>
</ListObject>
</ListObjects>
<Methods>
<Method></Method>
</Methods>
<Validations>
<Validation></Validation>
</Validations>
</BusinessObject>
Did this article solve your issue?
Let us know so we can improve!

