Am I missing the obvious parameter or function in C/side which would actually allow me to check if a recordref is open?
This to avoid the error from NAV saying RECORDREF variable not initialized.
Hope any one knows or maybe have a workaround other than keeping some parallel index for open or not.
It is needed for a temporary based array where i keep differnt tabels in differnt indexes, though out a process
Index[x,y] may have an open recordref but at runtime i need to check this.
Richard Lindberg
0
Comments
-create a new codeunit with a function that accepts a recordreference and function puts it in a global variable.
-in the OnRun-trigger access the variable so it gives an error if not initialized.
To control if the variable is initialized :
-Make a global (cduTestRecordReference) to that new codeunit.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
So this does not do the trick for me.
So conclusion is that I have to maintain a persited index keeping track on sets open - and in the same post hope that NAV development reads this and fixes this obvious lack of functionallity in c/side using RecordRef.
If so, this is dirty, but:
Can you create a new topic in the tips&tricks forum with this one?
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Sure, will do.
and the kriki-solution (if Codeunit.RUN then ... ) has a small but importend disadvantage: it can't be used in write transactions
using NAV5 and NAV6 classic.
are there any other solutions, how to test whether a record-Ref is initialized or not?
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)
and when it is not initialized, it returns 0.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
THX, this is working fine.
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)