- To get Department financial dimension value from Journal Transactions (LedgerJournalTrans)
// BP Deviation Documented
public display
OMOperatingUnitNumber sha_displayDepartment(){
DimensionAttribute dimAttribute =
DimensionAttribute::findByName('Department');
// Change 'Department' to which dimension you are
looking for
DimensionAttributeValueSetItemView dimAttributeValueSetItemView;select firstOnly dimAttributeValueSetItemView
where dimAttributeValueSetItemView.DimensionAttributeValueSet == this.DefaultDimension &&
dimAttributeValueSetItemView.DimensionAttribute == dimAttribute.RecId;
return dimAttributeValueSetItemView.DisplayValue;
}
- To get Department financial dimension value from Voucher Transactions (GeneralJournalAccountEntry)
// BP Deviation Documented
public display
OMOperatingUnitNumber sha_displayDepartment()
{
DimensionAttribute dimAttribute =
DimensionAttribute::findByName('Department');
// Change 'Department' to which dimension you are
looking for
DimensionAttributeLevelValueAllView
dimAttributeLevelValueAllView;
select
firstOnly
dimAttributeLevelValueAllView
where
dimAttributeLevelValueAllView.ValueCombinationRecId == this.LedgerDimension
&&
dimAttributeLevelValueAllView.DimensionAttribute
== dimAttribute.RecId;
return
dimAttributeLevelValueAllView.DisplayValue;
}