You are here:
List Object Contract Definition
Know about the elements and attributes that you can use to define a List Object contract.
Required Editions
| Available in: Enterprise, Performance, and Unlimited Editions |
| Attribute | Description | Value or Pattern | Required |
|---|---|---|---|
| simpleEditorOnly | If this attribute is set to true, the Modeler prevents opening in the tree editor. | Boolean. Default value is false. | No |
| name | Unique name of the described list object. This attribute is used to identify the list object and to reference it in other contracts. | String | Yes |
| generateLoadMethod | Specifies whether the framework should generate a load method for this list object. If set to false, create the beforeLoadAsync or afterLoadAsync method files manually (based on your project requirements) and specify the new methods in the <Methods> element. | Boolean. Default value is true. | No |
| generateCreateMethod | Specifies whether a create method should be generated for this list object. If set to false, it prevents automatic generation of the createAsync method in the <Methods> element. | Boolean. Default value is true. | No |
| paging | Determines whether the list object data should be loaded using paging. If set to true, the paging feature is activated for a list. For more information, see Paging. | Boolean | No |
| filter | Defines the advanced search mode, whether the search should be in-memory search or in-database search. See Advanced Search. | String | Yes |
| initialLoadPageSize | Defines the number of records to be fetched during paging from the database by using the datasource for the first load operation. | Integer | No |
| reloadPageSize | Defines the number of records to be fetched during paging from the database for any further load operations. | Integer | No |
| lightWeight | Possible values are false, only, and combined. When the lightWeight property is set to only or combined, then make sure that paging is set to 'false' and advanced search attributes are removed. | String. Default value is false. | No |
ListObject contract:
<ListObject name="Lo${NAME}" generateLoadMethod="true" schemaVersion="1.1">
<DataSource name="${DATASOURCE_REFERENCE}" />
<Item objectClass="Li${NAME}" />
<Methods>
<Method name="beforeSaveAsync" />
<Method name="afterSaveAsync" />
<Method name="afterLoadAsync" />
<Method name="beforeLoadAsync" />
<Method name="afterDoValidateAsync" />
<Method name="beforeDoValidateAsync" />
</Methods>
</ListObject>
<DataSource> Attribute
The DataSource attribute defines the relation of the list object to the data source. It holds
the SQL-statement to load the list. By convention, there is a 1:1 relationship between a
business object and a datasource for the list object. Each list object contract has just one
DataSource node. The only and required attribute of the DataSource element is the unique name of
the data source. For example - <DataSource name="DsLoMyBpaMED"
/>
<Item> Attribute
The Item attribute specifies the class of the list items that this list object contains. The
item definition defines the structure and properties of the list items. Each List Object
contract has exactly one Item element which specifies its List Item. The only and required
attribute of the Item element is the objectClass of the list item. For example - <Item objectClass="LiMyBpaMED" />
<Methods> Attributes
The Method attribute lists all methods available for the list object. Every list object can have both generated and customized methods. Declare all methods of a list object, including pre-, post-, and replace methods in the <Method> sub elements in the <Methods> element. The only and required attribute of the Method sub element is the name of the method. For example:
<Methods>
<Method name="beforeSaveAsync" />
<Method name="afterSaveAsync" />
<Method name="afterLoadAsync" />
<Method name="beforeLoadAsync" />
<Method name="afterDoValidateAsync" />
<Method name="beforeDoValidateAsync" />
<Method name="loadAsync" />
<Method name="saveAsync" />
</Methods>
<AdvancedSearchObjects> Attributes
AdvancedSearchObjects attribute contains specifications and profiles to support advanced search options in the app. For more information, see Advanced Search. The AdvancedSearchObjects element has no attributes but a list of AdvancedSearchObject sub elements. The only and required attribute of the AdvancedSearchObject sub element is its unique name.
Use the attributes in AdvancedSearchAttribute node to describe the Advanced Search layout. This table lists the attributes of the AdvancedSearchObject element.
| Attribute | Description | Required |
|---|---|---|
| label | Specifies the unique identification of this element. | String |
| property | Specifies the name of a simple property. For in-memory advanced search, specify the list attribute on which search is executed. For in-database advanced search, specify the name of the conditional parameter. | String |
| type | Specifies the data type of the search property. |
|
| defaultValue | Specifies the default value pre-displayed. | String |
| defaultOperator | Specifies the default operator depending on the value in type. | |
| toggleId | Specifies the toggle code used to determine possible selection values. | String |
| dataSource | Specifies the data source used to determine possible selection values. | A valid datasource |
| call | Specifies the business logic method executed to determine possible selection values. | ProcessContext::<Object>.<Method>ApplicationContext::<Object>.<Method> |
| lookupProcess | Specifies the name of the lookup process used to determine available values. For example -DeliveryRecipient::LookupProcess | Process name |
| lookupProcessReturnValue | Specifies the return value of the specified lookup process. For example - bpaMainPKey | String |
| lookupObject | Specifies the name of the lookup object used by the advanced search attribute. For example - LuCustomer | String |
| lookupObjectDisplayValue | Specifies the value to display for the lookup object in the advanced search attribute. For example - name | String |
| visible | Indicates whether this search attribute is visible. | Boolean |
| editable | Indicates whether this search attribute is editable. | Boolean |
| alwaysToday | Indicates whether this date type attribute is fixed to the current date. | Boolean |
| dateOffset | The number of days to add to any given date set for this date type attribute.Negative numbers are subtracted from the date. | Integer |
| numberFormat | Specifies the number format for a number type parameter. | String |
| stepSize | Specifies the step size for the number type parameter. | Integer |
Required and Optional Attributes by Parameter Type
This table lists the required and optional attributes depending on the advanced search parameter type.
| Attribute | Boolean | Date | Lookup | Number | Selection | Text |
|---|---|---|---|---|---|---|
| label | required | required | required | required | required | required |
| property | required | required | required | required | required | required |
| type | required | required | required | required | required | required |
| defaultValue | optional | optional | optional | optional | optional | optional |
| defaultOperator | optional | optional | optional | optional | optional | optional |
| toggleId | prohibited | prohibited | prohibited | prohibited | Group A: One required | prohibited |
| dataSource | prohibited | prohibited | prohibited | prohibited | Group A: One required | prohibited |
| call | prohibited | prohibited | prohibited | prohibited | Group A: One required | prohibited |
| lookupProcess | prohibited | prohibited | required | prohibited | prohibited | prohibited |
| lookupProcessReturnValue | prohibited | prohibited | required | prohibited | prohibited | prohibited |
| lookupObject | prohibited | prohibited | required | prohibited | prohibited | prohibited |
| lookupObjectDisplayValue | prohibited | prohibited | required | prohibited | prohibited | prohibited |
| Parameters/Input | prohibited | prohibited | optional | prohibited | prohibited | prohibited |
| visible | optional | optional | optional | optional | optional | optional |
| editable | optional | optional | optional | optional | optional | optional |
| alwaysToday | prohibited | optional | prohibited | prohibited | prohibited | prohibited |
| dateOffset | prohibited | optional | prohibited | prohibited | prohibited | prohibited |
| numberFormat | prohibited | prohibited | prohibited | optional | prohibited | prohibited |
| stepSize | prohibited | prohibited | prohibited | optional | prohibited | prohibited |
Here’s the explanation of the earlier table by using an example.
< AdvancedSearchAttribute label = "LoPrmContracts_PhaseId" property="phase" type="Selection" toggleId="PrmContractPhase" />
< AdvancedSearchAttribute label = "LoPrmContracts_DateFromId" property="dateFrom" type="Date"/>
< AdvancedSearchAttribute label = "LoPrmContracts_DateThruId" property="dateThru" type="Date"/>
< AdvancedSearchAttribute label = "RefSightDistance" property="distance" latitudeProperty="latitude" longitudeProperty="longitude" stepSize="2" editable="true" type="Distance" />
< AdvancedSearchAttribute label = "LoPrmContracts_Owner" property="ownerPKey" lookupProcess="USER::LookupProcess" lookupProcessReturnValue="userPKey" lookupObject="LuUser" lookupObjectDisplayValue="name" type="Lookup" />
<AdvancedSearchObjects>
<AdvancedSearchObject name="AsoContracts">
<AdvancedSearchAttributes profileId="default">
<AdvancedSearchAttribute label="LoPrmContracts_PhaseId" property="phase" type="Selection" toggleId="PrmContractPhase" />
<AdvancedSearchAttribute label="LoPrmContracts_DateFromId" property="dateFrom" type="Date" />
<AdvancedSearchAttribute label="LoPrmContracts_DateThruId" property="dateThru" type="Date" />
< AdvancedSearchAttribute label = "RefSightDistance" property="distance" latitudeProperty="latitude" longitudeProperty="longitude" stepSize="2" editable="true" type="Distance" />
<AdvancedSearchAttribute label="LoPrmContracts_Owner" property="ownerPKey" lookupProcess="User::LookupProcess" lookupProcessReturnValue="userPKey" lookupObject="LuUser" lookupObjectDisplayValue="name" type="Lookup" />
</AdvancedSearchAttributes>
</AdvancedSearchObject>
</AdvancedSearchObjects>
In this example, if the parameter type is Selection, the required attributes are label, property, and type. It should also include any one of these attributes: toggleId, dataSource, or call, as specified in the table. If the parameter type is Date, the required attributes are label, property, and type. If the parameter type is Distance, the required attributes are label, property, type, longitudeProperty, and latitudeProperty. If the parameter type is Lookup, the required attributes are label, property, type, lookupProcess, lookupProcessReturnValue,lookupObject, and lookupObjectDisplayValue.
<Parameter> Attribute
<Parameter> describes the parameters passed to a certain Process. Parameter is only applicable if the parent <AdvancedSearchAttribute> is of type Lookup. The <Parameter> element contains the <Input> element. <Parameter> itself does not have anyattributes. The table lists the attributes of the <Input> element.
| Attribute | Description | Required |
|---|---|---|
| name | Specifies the unique name of the input parameter. | Yes |
| type | Specifies the type of the input parameter. | No |
| value | Reference to a ProcessContext, ApplicationContext, Event variable, or literal value. | Yes |
<AdvancedSearchAttribute label = "LoPayCttPayment_PaymentType" property="paymentType" lookupProcess="PaymentTemplate::MetaLookupProcess" lookupProcessReturnValue="metaPKey" lookupObject="LuPaymentType" lookupObjectDisplayValue="text" type="Lookup">
<Parameters >
<Input name = "metaType" type="Literal" value="ContractPayment" />
</Parameters >
</AdvancedSearchAttribute >
AdvancedSearchAttribute Default Value Macros
These macros can be used as default values where applicable:
| Makro | Description |
|---|---|
| #SalesOrg# | Sales organization of the currently logged in user. |
| #Language# | Language of the currently logged in user. |
| #Client# | Client id of the currently logged in user. |
| #UserPKey# | PKey of the currently logged in user. |
| #Today# | Current date without time. |
| #MaxDate# | System wide maximum date. |
| #MinDate# | System wide minimum date. |
| #Now# | Current date and time. |
<AdvancedSearchAttribute label="ToDo_Responsible" property="responsiblePKey" defaultValue="#UserPKey#" lookupProcess="User::TeamLookupProcess" lookupProcessReturnValue="userPKey" lookupObject="LuUser" lookupObjectDisplayValue="name" type="Lookup" />
<AdvancedSearchAttribute> Comparators
These comparators are valid for the defaultOperator attribute of the <AdvancedSearchAttribute>element.
| Search Field Type | Operator | Meaning |
|---|---|---|
| Text | CT | Contains |
| CN | Contains Not | |
| EQ | Equals | |
| NE | Not equals | |
| LT | Smaller | |
| GT | Greater | |
| Number | EQ | Is |
| NE | Is not | |
| LT | Before | |
| GT | After | |
| Selection | EQ | Is |
| NE | Is not | |
| Lookup | EQ | Is |
| NE | Is not | |
| Distance | WI (Within) is the only supported operator. No defaultOperator is supported and the WI operator is implicitly used. | |

