Thursday, February 28, 2019

How to select Financial Dimensions using the Default dimension value in X++?

dimStorage                  = DimensionAttributeValueSetStorage::find(custtrans.defaultdimension);

        for(i=1 ; i<= dimStorage.elements() ; i++)
        {
            if(DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name == #Product)
            {
                ProductUnit = dimStorage.getDisplayValueByIndex(i);

                select Value,Description from dimensionFinancialTag where dimensionFinancialTag.Value == ProductUnit;
                Product = dimensionFinancialTag.Description;
            }
            if(DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name == #ProfitCenter)
            {
                ProfitcenterUnit = dimStorage.getDisplayValueByIndex(i);

                select Value,Description from dimensionFinancialTag where dimensionFinancialTag.Value == ProfitcenterUnit;
                branchname = dimensionFinancialTag.Description;
            }
        }

1 comment:

  1. Thanks for sharing this.,
    Leanpitch provides online training in Scrum Master during this lockdown period everyone can use it wisely.
    Join Leanpitch 2 Days CSM Certification Workshop in different cities.


    Best Scrum master certification

    ReplyDelete

How to enable the dimension fields based on the Item selected on the form.

[Form] public class KMTShipFromWarehouses extends FormRun {     InventDimCtrl_Frm_EditDimensions        inventDimFormSetup;     /// &l...