Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Set CHANGECOMPANY globally in NAV database

Posted on by 70

Does anybody have any suggestions on how to post orders from a NAS client to different companies.

Here's what I'm trying to do...

I have created a codeunit to send and receive info Using Webservices then created a  Job Queue and a  NAS client to run every 15 minutes. The webservice sends orfder information  to several companies in Navision thru heavy use of CHANGECOMPANY. In most cases this works fine, but when we get to posting for instance orders in Navision this gets complicated.
Because Codeunit 80 calls a bunch of different functions and uses several tables.
What I really would love is to be able to CHANGECOMPANY globall within the current client, then my problem would be solved. But no such thing exists as far as I know.

Any help would be appreciated

Thanks

*This post is locked for comments

  • Suggested answer
    Muratvzr Profile Picture
    Muratvzr 743 on at
    RE: Set CHANGECOMPANY globally in NAV database

    It's happening when you use change company you should not use VALIDATE method other things go well. look your code and remove VALIDATE codes.

  • Ebitas Profile Picture
    Ebitas 70 on at
    RE: Set CHANGECOMPANY globally in NAV database

    Thanks Ahmed; The file I'm getting contain data for all Companies. but I'll do what you have suggested and try to add code to pull company specific data from the file.

    Thanks again for your reply and help

  • Rashed Profile Picture
    Rashed 3,765 on at
    RE: Set CHANGECOMPANY globally in NAV database

    I suggest to create Job queue in the other companies and each job queue for that company will process the orders. 

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