Financial Dimension

//To get financial dimension Declare it in your class declaration

    DimensionValue projDisplayValue;

    DimensionValue pnlDisplayValue;

    DimensionValue territoryDisplayValue;

    DimensionValue statCoDisplayValue;

//cede snippet to get dimensions here we use cust Trans table . you can use your desired table here

void insertFinancialDimension(CustTrans _custTrans)

{

    DimensionAttribute dimAttr; //Main dimension attribute table

    DimensionAttributeValue dimAttributeValue;

    DimensionAttributeValueSetItem dimAttributeValueSetItem;

        while select DisplayValue from dimAttributeValueSetItem

            where dimAttributeValueSetItem.DimensionAttributeValueSet == _custTrans.DefaultDimension

            join dimAttributeValue where dimAttributeValue.RecId == dimAttributeValueSetItem.DimensionAttributeValue

                join dimAttr where dimAttr.RecId == dimAttributeValue.DimensionAttribute

                && (dimAttr.Name == ‘Purpose’ || dimAttr.Name == ‘Center’ || dimAttr.Name == ‘DTerritory’ || dimAttr.Name == ‘Department’)

        {

            switch (dimAttr.Name)

            {

                case ‘Center’:

                    pnlDisplayValue = dimAttributeValueSetItem.DisplayValue;

                break;

                case ‘Purpose’:

                    projDisplayValue = dimAttributeValueSetItem.DisplayValue;

                break;

                case ‘DTerritory’:

                    territoryDisplayValue = dimAttributeValueSetItem.DisplayValue;

                break;

                case ‘Department’:

                    statCoDisplayValue = dimAttributeValueSetItem.DisplayValue;

                break;

            }

        }

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s