Company ID and Company Name
cloudnine
Member Posts: 25
Hi guys...
Just a question...
Is there a Company ID in Navision or is Company Name itself is the ID for a company in Navision...
Thanks...
Just a question...
Is there a Company ID in Navision or is Company Name itself is the ID for a company in Navision...
Thanks...
0
Comments
-
Hi cloudnine,
I just know CompanyName, no ID.
(even that you have to use Name for Changing Company)
-> take a look at Table 2000000006 (Company)0 -
That´s an idea,
but let NAV make it for you with autoincrement
- I don´t think you always want to Insert & Delete Companies
0 -
Hej Waldo,
I ment,
Just make a new Int-Field and chose Autoincrement = TRUE.
That´s all and you don´t need Code at all!
Sure - I know the order of this field is not equal to the order of Companies if you don´t insert them in alphabetical order, but if you do so, why writing Code?
And one Company always has the same ID during existing in database...
But I think cloudenine just wanted to know IF this ID exists??
And this question we have already answered =D>
@Waldo:
Just interested: What code dou you would write?
giving an example:
Adding following Companies (in writting Order):
A , X, L, B
what ID they have after your code?0 -
Thanks MissesMagic for answering my question...
Waldo thanks also to you but we dont want to alter the navision tables/database...
Thanks0 -
MissesMagic wrote:@Waldo:
Just interested: What code dou you would write?
:-k
Just from the top of my head ...
- add new integer field to company table
- add key on this field
- OnInsert write code:
- sort on integer field (Seperate record variable
)
- get last ID
- Generate New ID
- Add this ID to current record
A=1giving an example:
Adding following Companies (in writting Order):
A , X, L, B
what ID they have after your code?
X=2
L=3
B=40 -
That are the IDs I expected.
You get the same result, when you just set the "AutoIncrement"-property of Field "ID" to yes
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 333 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 991 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
