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,
Bert van Dijk
Rotor BV
0
Answers
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 Mohanbabu
Long way to go before I sleep..
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.
Rotor BV
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 Mohanbabu
Long way to go before I sleep..