Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

x++ code to get business unit form bankaccounttrans please help

(1) ShareShare
ReportReport
Posted on by

pastedimage1681310140814v1.png

this is bank account trans form

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: x++ code to get business unit form bankaccounttrans please help

    I have written the code wrongly. I have edited the code. Please check.

    Thanks,

    Girish S.

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: x++ code to get business unit form bankaccounttrans please help

    DisplayValue field is in DefaultDimensionView that is dimensionView buffer not in accountTrans buffer.

    Thanks,

    Girish S.

  • RE: x++ code to get business unit form bankaccounttrans please help

    here display value is not found in accounttrans buffer . can you please help

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: x++ code to get business unit form bankaccounttrans please help

    I guess BankAccountTrans table is related to the form you are asking. If yes then below code helps you.

    DefaultDimensionView dimensionView;
    BankAccountTrans accountTrans;
    
    while select * from accountTrans
        join dimensionView
        where accountTrans.DefaultDimension == dimensionView.DefaultDimension
        && dimensionView.Name == "BusinessUnit"
    {
        info(strfmt("%1,%2,%3",accountTrans.AccountId,accountTrans.Voucher,dimensionView.DisplayValue));
    }

    Thanks,

    Girish S.

  • RE: x++ code to get business unit form bankaccounttrans please help

    Form name is AOT > BankAccountTrans   itself then , financial dimension tab

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: x++ code to get business unit form bankaccounttrans please help

    Can you tell me the navigation of the form.

    Thanks,

    Girish S.

  • RE: x++ code to get business unit form bankaccounttrans please help

    Can you help with exact code it would be really really helpfull

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: x++ code to get business unit form bankaccounttrans please help

    Hi sachin mittal,

    Use DefaultDimensionView to get the business unit. DefaultDimensionView contains field named "Name" where you can add "Business unit" as a range.

    You can use DefaultDimension field in the view to use as relation.

    Thanks,

    Girish S.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,971 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,846 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans