Accessing Multiple Books' Data

RachelSoon
Member Posts: 202
Hi,
I would like to lookup Company Book B data while my current active book is Compaby A.
I tried using "CHANGECOMPANY" but it doesn't work.
Is there any other command/ method can achieve my above request?
Hope someone out there can share if you have encountered similar situation.
Thank you!
I would like to lookup Company Book B data while my current active book is Compaby A.
I tried using "CHANGECOMPANY" but it doesn't work.
Is there any other command/ method can achieve my above request?
Hope someone out there can share if you have encountered similar situation.
Thank you!
0
Comments
-
Hi,
Changecompany is the command. It only changes the company selection for the table given as parameter, not for any variables or tables accessed through flowfields of this table. So, you can't use any C/AL using non-global tables or flowfields. This makes the access a good deal more complicated than expected.
with best regards
Jens0 -
Hi,
Since "CHANGECOMPANY" will not be able to be used as a variable to look up to the record in another company book,
anyone has method/suggestions in order to do so?
Thank you.0 -
Hi,
it is possible to build this, and you need CHANGECOMPANY for it. The catch is that you don't have flowfields and validates. Showing the entries of an account in a different company is not really a problem, showing balances of a different company in the chart of accounts is more complicated.
with best regards
Jens0 -
Hi Jens,
Thank for the reply.
I am not showing the balance in a different company. I just need to lookup the Vendor list.
I did the following code at the text box (OnLookup) on a form, but it doesn't retrieve the vendor from Company B, it's still
showing the Vendor from the current active company:
Vendor.CHANGECOMPANY("COMPANYB");
IF FORM.RUNMODAL(FORM::"Vendor List", Vendor) = ACTION::LookupOK THEN
"OtherVendor" := Vendor."No.";
Thank you.0 -
Hi,
the code looks like it should work.
with best regards
Jens0
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