"Simulation" of intercompany functionality

rsaritzky
Member Posts: 469
Hi:
I'm working at a 3.60 site planning an upgrade to Nav2009. They have a very-limited intercompany type of functionality already customized. It actually mirrors very much the design of the new standard Intercompany granule (though a lot more limited in features). But the general architecture is similar:
1. A purchase invoice is created in company A to Vendor "123". When this happens, a record gets written to an intercompany table. When this intercompany table is processed, a second purchase invoice in company B is created, with Company A as the vendor. Also, a Sales Invoice in Company A (with Company B as the customer) is also created.
2. Currently, a Processing-Only report in Company B is run that runs against the intercompany table that actually creates the Purchase Order in Company B.
They wish to change the processing slightly - they would like ot change it to the following.
When the Purchase order in Company A is POSTED, it then creates the intercompany record, but the process to create the Purchase Order in company B happens immediately, and the Purchase Order in Company B is posted automatically.
My question is: Has anyone ever tried to initiate a process (i.e. call a codeunit or run a ProcOnly report) from one Company that executes the process in another company, i.e. could I do a CHANGECOMPANY('Company B') and then do a REPORT.RUN or CODEUNIT.RUN? Would this work?
Any suggestions would be appreciated.
I'm working at a 3.60 site planning an upgrade to Nav2009. They have a very-limited intercompany type of functionality already customized. It actually mirrors very much the design of the new standard Intercompany granule (though a lot more limited in features). But the general architecture is similar:
1. A purchase invoice is created in company A to Vendor "123". When this happens, a record gets written to an intercompany table. When this intercompany table is processed, a second purchase invoice in company B is created, with Company A as the vendor. Also, a Sales Invoice in Company A (with Company B as the customer) is also created.
2. Currently, a Processing-Only report in Company B is run that runs against the intercompany table that actually creates the Purchase Order in Company B.
They wish to change the processing slightly - they would like ot change it to the following.
When the Purchase order in Company A is POSTED, it then creates the intercompany record, but the process to create the Purchase Order in company B happens immediately, and the Purchase Order in Company B is posted automatically.
My question is: Has anyone ever tried to initiate a process (i.e. call a codeunit or run a ProcOnly report) from one Company that executes the process in another company, i.e. could I do a CHANGECOMPANY('Company B') and then do a REPORT.RUN or CODEUNIT.RUN? Would this work?
Any suggestions would be appreciated.
Ron
0
Comments
-
you cannot use change company. You can use it to insert the record, but you cannot run the business logic.
You need to use webservice. Here is a link on how to use webservice.
http://mibuso.com/blogs/ara3n/2009/01/2 ... companies/
You can use the example and create a new function and call the webservice function to post the PO.0 -
Thanks for the link to how to use a web service - good idea, nice explanation on the link.Ron0
-
you are welcome and good luck.0
-
0
-
You are welcome. webservices is a solution to many short comings in nav.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions