CHANGECOMPANY

ByHakan
Member Posts: 24
Hi,
I have a two company in navision (KARLOS and KARGUM) ı must compare Tax registration No. for two company (İn Customer Table)
How ı can compare Tax registration No. for two company?
Thanks
I have a two company in navision (KARLOS and KARGUM) ı must compare Tax registration No. for two company (İn Customer Table)
How ı can compare Tax registration No. for two company?
Thanks
0
Comments
-
Hi,
Do you mean you have two companies in your database. And you want to compare the VAT Registration no's in table 18 (Customer)?
The Customer no's in table 18 are the same and you want to check if the customers have the same VAT Registration no in the two companies?
Or you want to check if the VAT Registration No exist in the other company customer table?0 -
I want to check if the tax registration no. field is the same for the same customers in the different companies at the same database?0
-
Same reply as I put on DynamicsUser: http://dynamicsuser.net/forums/p/46553/235398.aspx#235398
So again, use the CHANGECOMPANY command. What code have you already tried? What errors / problems are you having?
Think about what you want to do step by step or in pseudo-code first
Get the tax registration number for this customer and store it somewhere for future use.
Get the tax registration number for the same customer, but in a different company and store it somewhere for future use.
Compare each of those tax registration numbers and take the appropriate action.
Think about those individually, write the code for each individually, and you will have a solution.0 -
Hi, I have added an example how you can do this check
OBJECT Report 50001 Customer VAT Check { OBJECT-PROPERTIES { Date=26-10-11; Time=15:16:13; Modified=Yes; Version List=; } PROPERTIES { } DATAITEMS { { PROPERTIES { DataItemTable=Table18; OnAfterGetRecord=BEGIN GRCustomer.CHANGECOMPANY('the-name-of-the-other-company'); IF GRCustomer.GET("No.") THEN BEGIN IF "VAT Registration No." <> GRCustomer."VAT Registration No." THEN GBwrong := TRUE ELSE GBwrong:=FALSE; END; END; } SECTIONS { { PROPERTIES { SectionType=Header; SectionWidth=12000; SectionHeight=846; } CONTROLS { { 1000000001;Label ;0 ;0 ;1650 ;846 ;ParentControl=1000000000; VertAlign=Bottom; FontBold=Yes; MultiLine=Yes } { 1000000003;Label ;2100 ;0 ;4500 ;846 ;ParentControl=1000000002; VertAlign=Bottom; FontBold=Yes; MultiLine=Yes } { 1000000005;Label ;6750 ;0 ;1500 ;846 ;ParentControl=1000000004; VertAlign=Bottom; FontBold=Yes; MultiLine=Yes } { 1000000006;Label ;8550 ;0 ;1500 ;846 ;VertAlign=Bottom; FontBold=Yes; MultiLine=Yes } } } { PROPERTIES { SectionType=Body; SectionWidth=12000; SectionHeight=423; } CONTROLS { { 1000000000;TextBox;0 ;0 ;1650 ;423 ;SourceExpr="No." } { 1000000002;TextBox;2100 ;0 ;4500 ;423 ;SourceExpr=Name } { 1000000004;TextBox;6750 ;0 ;1500 ;423 ;SourceExpr="VAT Registration No." } { 1000000007;TextBox;8550 ;0 ;1500 ;423 ;SourceExpr=GRCustomer."VAT Registration No." } { 1000000008;TextBox;10200;0 ;1500 ;423 ;SourceExpr=GBwrong } } } } } } REQUESTFORM { PROPERTIES { Width=9020; Height=3410; } CONTROLS { } } REQUESTPAGE { PROPERTIES { } CONTROLS { } } CODE { VAR GRCustomer@1000000000 : Record 18; GBwrong@1000000001 : Boolean; BEGIN END. } RDLDATA { } }
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