Extending an existing view entity with a currency column
If you create or extend a view entity that
references a column that is of type="currencyamount",
you must handle the view entity extension in a particular manner. If
the view entity extension references a currencyamount
column, then you also need to define the currencyProperty that the original
column definition specifies on the view entity as well.
For example, suppose that in PolicyCenter, you extend
the PriorClaimView view entity by adding an OpenReserves
field that has a path reference to ClaimRpt.OpenReserves:
<viewEntityColumn name="OpenReserves" path="ClaimRpt.OpenReserves"/>Looking at the definition
of ClaimRpt, you see the
following:
<column default="0" desc="The open reserves." name="OpenReserves" nullok="false" type="currencyamount">
<columnParam name="currencyProperty" value="ClaimCurrency"/>
</column>Notice that ClaimRpt.OpenReserves
is of type="currencyamount".
Thus, if you extend PriorClaimView
with this field as indicated, you also need to add the following to PriorClaimView.etx:
<viewEntityTypekey name="ClaimCurrency" path="Currency"/> By defining a ClaimCurrency column on the view entity, the view entity loads the
claim currency as a part of the view entity. This makes the claim currency available to the
currencyamount column and PolicyCenter avoids
loading the whole entity while dereferencing Claim.Currency.
The complete extension of the PriorClaimView view entity
for this example is as follows:
<viewEntityExtension entityName="PriorClaimView">
<viewEntityColumn name="OpenReserves" path="ClaimRpt.OpenReserves"/>
<viewEntityTypekey name="ClaimCurrency" path="Currency"/>
</viewEntityExtension>
