Business Objects - Functions
reviewed: 8 November 2025
Massaging Descriptors on Lists
The key is to create and massage a descriptor using boDesc.create() and use that descriptor as the entity.
function main()
set( 'salesOrderLine', boDesc.create( 'om/salesOrderLine' ) )
boDesc.setAttrLabel( [salesOrderLine], 'quantity', <@mlText 'Ordered quantity' > )
page.render( page.get( './main' ) )
end-function
resource main
<@page/container
content: <@page/content
<@page/data/table/qsearch
iterator: iterator.ofEntity(
entities: <
<@iterator/entity
name: 'salesOrderLine'
entity: [salesOrderLine]
>
>
)
group: 'description'
>
>
>
end-resource
List Totallers
Notes: this requires the base layer.
- Use
classto control the style of the total cell - Use
formatto control the formatting (outputmask) of the total value - Use
tooltipto add a tool-tip to the total value - Use
valueAttributeto sum the value of another attribute than the attribute associated with the column
resource main
<@page/container
content: <@page/content
<@page/data/table
iterator: iterator.ofEntity(
entities: <
<@iterator/entity
name: 'salesOrderLine'
entity: 'om/salesOrderLine'
>
>
)
group: 'description'
totallers: <
<@page/data/table/totaller
attribute: 'netLinePrice'
>
<@page/data/table/totaller
attribute: '_totalReadyItems'
>
>
>
>
>
end-resource
Extended search
Notes: this requires the base layer.
- Combine the traditional filter and the new
entitiesoption - The where clause impact of the
entitiessection is handled by the qualifier
resource main
<@page/container
content: <@page/content
<@page/data/table/qsearch/extended
filter: <@page/data/table/qsearch/extended/filter
name: '//filter'
entity: 'ms/_filter'
groups: 'objects.main'
entities: <
<
name: '//object'
entity: 'om/object'
iteratorEntityName: 'object'
groups: 'id,electricalStatus,mechanicalStatus,reference,SAPReference,FEReference,serialNumber,QRCodeReference'
>
>
>
iterator: iterator.ofEntity(
entities: <
<
name: 'object'
entity: 'om/object'
orderBy: 'reference'
where: $buildString(
'&',
if(
isNotNull( bo.attr( [//filter], 'make' ) ),
'#exists[ rd/make, #qsearch( search, { bo.attr( [//filter], "make" ) } ) ]',
''
),
if(
isNotNull( bo.attr( [//filter], 'model' ) ),
'#exists[ rd/model, #qsearch( search, { bo.attr( [//filter], "model" ) } ) ]',
''
),
if(
isNotNull( bo.attr( [//filter], 'objectType' ) ),
'#exists[ rd/objectType, #qsearch( search, { bo.attr( [//filter], "objectType" ) } ) ]',
''
)
)
>
// Rest of code example left out...