Hello
I'm looking for ideas on how extract the glentries that get posted to fix inconsistency issue. Normaly I use
message(GLEntry."G/L Account No." + ' ' + GLEntry."Amount");
I've tried to dump the data to file, but navisioni errors because the file get's locked out. So you have to create new file. (not helpfull);
You could use automation. shell command?
Ahmed Rashed Amini
Independent Consultant/Developer
blog:
https://dynamicsuser.net/nav/b/ara3n
Answers
why don't you make a table (if you have permissions for that) and than enter values into that table rather then into the file?
I had similar problem and new table helped.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Indeed. My mistake.
What about small code that inserts into SQL through ActiveX ADO?
That should work if you properly open and close connectiong each g/l line.
Looking for something more simply and practical.
Any ideas are welcome.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
RIS Plus, LLC
MVP - Business Apps
(But something lets me think you aren't working on SQL... so I would go with the solution of Denster)
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
So, you could make new function in this codeunit (actually, few of them) open file in that function, than in codeunit 12, you send whole record to 417 function that will write to file.
You will have to adjust Codeunit 1 cause you want to ensure that file is opened (on Navision Login) and closed (on Navision Logout).
I don't know what are prerequisits for use of codeunit 417 and, note that i'm talking of Navision 3.60... Not sure will it work on 4.x
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Here is my code.
New Codeunit 50090 Single Instance. Insert is a new function.
in codeunit 12 in finishcodeunit function added the following code
After posting the order and get the inconsistency error.
Run codeunit 50090 and you'll see all the GL Entries.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
RIS Plus, LLC
MVP - Business Apps
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I tested it with breaking of transaction in posting procedure and, my test data is still in temp table.
Is this mean that temporary records are not rolled back on transaction break?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
sorry, my bad. first I saw this thread then the other one.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I'm trying to get this single instance codeunit to work for me, but I seem to keep getting a duplicate entry error. It seems the codeunit tries to write to the G/L Entry table. I am still a little weak on my programming but I thought the single instance codeunit saved the entries to a temp table and not the actual g/l table.
Hoping someone can tell me what I have overlooked. ](*,)
Dneal
Also are you deleting the entry no once the form is closed?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I didn't set the tempglentry variable to temp, once I did everything worked superb! I have to admit that was a new property for me. Thank you so much for your idea and your help, it is greatly appreciated!
Dneal
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Can some one suggest me on how to clear the temporary records inserted for G/L entry using the SingleInstance codeunit.
This case is for,
I have run the SingleInstance Codeunit once to analyse the Inconsistency and now I am able to reslove the problem. Again for another transaction, I am facing the same inconsistency problem. But when I run the codeunit, it still shows the old records which got inserted for first transaction.
Now I need to clear these records and would like to know the entries for second transaction.
Please suggest. Thanks in advance to all.
Falling down is not a defeat..defeat is when you refuse to get up.
And before you run the whole thing, you need to call that new function.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
In this function delete Tempory entries.
Add a buttom somewhere and call this function.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n