I need to call Codeunit.Run after inserting a record into a temporary table. For this, I created temporary table and successfully inserted the record from VB. In Table, I have written the code in OnInsert() Trigger… CodeUnit.Run(12,rrr), Where rrr is the Recordset of Table 81. If I open the table directly in Navision and Enter the values (Using RUN Button in Object Designer), The Trigger is working fine. But, if I try to insert a record from VB, the Record gets inserted successfully, but the trigger is not getting executed. Any suggestions ?
I just came across, a statement in ODBC.pdf, that, TRIGGERS ARE NOT RUN WHEN A C/ODBC CLIENT WRITES DATA IN A NAVISION ATTAIN DATABASE. Any suggestion on reaching triggers in someother way ? Kindly suggest…
As far as i know there is no possibility to reach Navision triggers outside Navision. But with Navision Application Server this is possibel. But then you will have to execute your VB code from inside a Application server. So take a look at Application server.
Is there any way to calc flow fields from VB/ASP?
Flowfields work, when using ODBC.
I’ve gone around this problem in the past by replicating the codeunit’s functionality in VB. (Mind you, they weren’t posting codeunits. Good luck if you want to call codeunit 80…). But it works for smaller codeunits. Andre
One way is to insert data in a table and let NAS take care of the actions inside Navision.