Skip to main content

Notifications

Microsoft Dynamics NAV forum
Suggested answer

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

  • 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

Dynamics 365 Community Update – Sep 16th

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

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,522 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,441 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans