Must RecId in Axapta be unique? (Rec.create w.SQL)

burdee64
Member Posts: 20
Hi,
I'm creating an windows-application (C#) which will add new records in an table created in Axapta. Thus I have to fill the fields DataAreaId and RecId.
Must the RecId be unique through all tables?
Do I have to find the highest RecId (somehow) in Axapta first (and add 1) to assign this value to the new record, or is it allowed to start over again with RecId = 1 for this table.
If unique is mandatory, how do I receive this highest value?
Axapta 3.0, SP3
TIA,
I'm creating an windows-application (C#) which will add new records in an table created in Axapta. Thus I have to fill the fields DataAreaId and RecId.
Must the RecId be unique through all tables?
Do I have to find the highest RecId (somehow) in Axapta first (and add 1) to assign this value to the new record, or is it allowed to start over again with RecId = 1 for this table.
If unique is mandatory, how do I receive this highest value?
Axapta 3.0, SP3
TIA,
Bert van Dijk
Rotor BV
Rotor BV
0
Answers
-
Hi,
Here are my .02 cents -
What table are you trying to populate? If possible please try to stick with calling standard Axapta APIs through COM for such purposes. This way you don't have to worry about recIds etc.
In Axapta, the class systemSequence is responsible for assigning unique recId for all SQL tables. Please read the online help for more info.
Regards,
Harish MohanbabuHarish Mohanbabu
Long way to go before I sleep..0 -
Thnx Harish,
I've noted your quick responses in this forum...
It's a newly created table I'm filling. It's feeding a batchapplication in Axapta with new tasks. I want to keep both applications separated from each other.
(And I must admit, I haven't written a COM-connection before, so that's still open grounds for me :? )
I can't find the class systemSequence, as it is not showing in AOT.
But I will study online help.
Thanks alot.Bert van Dijk
Rotor BV0 -
Hi,
systemSequence class is available under AOT -> System documentation -> Classes. Or paste this in the online help system - "KERNDOC://Classes/systemSequence" (without quotes)
Also to get some inspiration do please refer to this MSDN article titled "Using Axapta Business Connector to Create Microsoft Axapta Ledger Journals" -
http://msdn.microsoft.com/mbs/default.a ... ledgdm.asp
Good luck
Harish MohanbabuHarish Mohanbabu
Long way to go before I sleep..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