Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

lookup in different company

Posted on by 583

Hi

I select a company in a lookup and depending on the selection I want to show FixedAssets in a drop down from the selected Company

How can I realize this?

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,114 Super User 2024 Season 2 on at
    RE: lookup in different company

    You can use fixedasset.changecompany(<from company>);

    and repeat the records of fixedasset and insert in a tempfixedasset record.

    finally you can run the page as shown above by passing the tempfixedasset record and save the selected fixed asset no. in the field.

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,035 Super User 2024 Season 2 on at
    RE: lookup in different company

    Hi, You can use the method below to open the record in another company for the user to select.

    More details: https://yzhums.com/5985/#toc1

    pastedimage1674450034353v1.png

    Hope this helps.

    Thanks.

    ZHU

  • CRSW Profile Picture
    CRSW 583 on at
    RE: lookup in different company

    Oh yes but how can I do this to show lookup values? They are shown by reference

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,035 Super User 2024 Season 2 on at
    RE: lookup in different company

    Hi, you can use Record.ChangeCompany([Text]) Method to redirect references to table data from one company to another.

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-changecompany-method

    Here is a simple example:

    https://yzhums.com/21252/

    Hope this can give you some hints.

    Thanks.

    ZHU

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 Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

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... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans