Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / How to create a field ...
Finance forum

How to create a field which can lookup FINANCIAL DIMENSIONS

(0) ShareShare
ReportReport
Posted on by 960

Hi 

          On released product details, the Financial dimensions can drop down to select value.

          Now, I want to create a field in a table, and layout this field to a new form.

          How can I make this field to lookup "BankAccount" values, and select it.

Best Regards,

JustZM

8468.png

6811.png

  • Suggested answer
    Jean_Frederic Profile Picture
    Jean_Frederic 10 on at
    How to create a field which can lookup FINANCIAL DIMENSIONS
    In the meantime, there's a more streamlined solution:
     
    Create a string field and add to the form, then use the following code:

    [FormControlEventHandler(formControlStr(VendEditInvoiceeditCostCenter), FormControlEventType::Lookup)]
    public static void editCostCenterFilter_OnLookup(FormControl senderFormControlEventArgs e)
    {
        FormStringControl       control = sender as FormStringControl;
        DimensionValueLookupHelper::lookupDimensionValues(DimensionAttribute::findByName('CostCenter'), control,curExt());
    }
  • JustZM Profile Picture
    JustZM 960 on at
    RE: How to create a field which can lookup FINANCIAL DIMENSIONS

    Hi Sumit Loya

             Thank you very much!

             It works.

    Best Regards,

    JustZM

  • Verified answer
    Sumit Loya Profile Picture
    Sumit Loya 2,230 on at
    RE: How to create a field which can lookup FINANCIAL DIMENSIONS

    Hi,

    If I understand your requirement correctly, you would like to create a field for a single financial dimension "BankAccount". I am assuming on a standard table. You can do following:

    1. Create an extension of the required table

    2. Create new string field with "DimensionValue" as ExtendedDataType

    3. On the form, add field and for the same form control create OnLookup event handler code as shown below:

                   FormStringControl   ctrl = _formControl as FormStringControl;

                   Args                args;

                   FormRun             formRun;

                   DimensionAttribute  dimensionAttribute;

                   select dimensionAttribute

                       where dimensionAttribute.Name == 'NameOfYourFinancialDimension';

                   args = new Args();

                   args.record(dimensionAttribute);

                   args.caller(_formControl);

                   args.name(formstr(DimensionLookup));

                   formRun = classfactory.formRunClass(args);

                   formRun.init();

                   ctrl.performFormLookup(formRun);

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans