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 a NAS client that listens to reqests from a web site. And this web site "talks" 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!
0
Comments
What we did:
We use 2 NAS clients. One controls the other. for changing company: it stops the service, it changes the parameters, and it starts the service again. This way, it can post whatever it wants... without worrying about CHANGECOMPANY...
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Maybe, another post arises after a few trials and errors
we wrote a seperate DLL that does this ... quite easy in VB.NET. Else you would run a shell-command like "NET STOP" and "NET START" to stop and start services.
Basically the DLL does the following:
- Stop service
- Change registry settings (for the NAS)
- Start service
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Does your DLL routine wait for the NAS process to complete before closing it and preparing the next request.
If it doesn't, then you would need X number of NAS clients, depending on how many reqests there are before the first one finishes.
And NAS clients costs money
Are you with me?!
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Thanks a lot, we have come a long way today
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
you mean that you need a NAS for each company?
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
a) you send request to one of the NAS, it look at it, see that it is for his company (then process it) or it is for another company (than forward it to another NAS)
b) you have extra NAS, which take the request and forward it to apropriate NAS for the company...
Where NAS1 is the 'switch NAS', NAS2 is NAS for Company1, NAS3 is NAS for Company 2, NAS4 for Company 3 etc...[/quote]
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I like the second option ... . Pretty straight forward... .
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
What is the performance like?!? When you all the time have to, start NAS, then wait for process to finish and then close NAS, when processing requests.
Stopping and starting a NAS doesn't take much time ... .
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
That would take 2 sessions and no need to post from another company (which is impossible unless you want to duplicate all posting codeunits and related) That will also allow people like me which doesn't have a dumb about how to create a dll to do so. Rolling Eyes
The only problem would be to control the waiting bills (presumably you would hide those from the regular forms).
PD: Sorry, admin