Skip to main content

Notifications

Announcements

No record found.

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

lookup in different company

Posted on by 593

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,139 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,696 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 593 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,696 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans