At Runtime
The custom data is included in a predefined way in the custom data element.
For example, if a customization library contains:
case "Order":
| Custom data element for this component is Order.Header.UserArea.
| Fill in your table fields here.
| You can use data from one of the following table(s):
| ppmmm123.
addTableField("CustomDate", "ppmmm123", "cdat", "Date")
addCdfField("SomeNotes", "ppmmm123", "cstr", "String")
addCdfField("CustomNumber", "ppmmm123", "cnum", "Integer")
addTableField("MyFlag", "ppmmm123", "flag", "Checkbox")
addTableField("MyAmount", "ppmmm123", "amnt", "Numeric")
break
Then the XML as used to contain the BOD/BDE data will contain for
example:
<UserArea>
<Property>
<NameValue name="ln.cust.CustomDate" type="DateTimeType">2009-06-24T14:00:00Z</NameValue>
</Property>
<Property>
<NameValue name="ln.cust.SomeNotes" type="StringType">Customer-specific order notes</NameValue>
</Property>
<Property>
<NameValue name="ln.cust.CustomNumber" type="IntegerNumericType">10</NameValue>
</Property>
<Property>
<NameValue name="ln.cust.MyFlag" type="IndicatorType">true</NameValue>
</Property>
<Property>
<NameValue name="ln.cust.MyAmount" type="NumericType">25.95</NameValue>
</Property>
</UserArea>
The custom data is handled automatically for:
- BDE List/Show response.
- Events or BODs that are published using one of the ShowAndPublish methods.
- Standard BDE Create and Change methods, and for incoming BODs that are handled through these methods.
The custom data is not handled for other methods. It is also not handled for List, Show, Create and Change methods that have a specific batch implementation through an on execute hook.
Custom data will not be handled if the corresponding database row does not exist. This can be the case if a component is mapped to two tables, while a row is not mandatory for the secondary table.