Hi all,
I have use-case mentioned below for resolving my problem.
WMDATA db. //3rd party database
Table --> WMProductionBatch
Column --> Issued
Data type --> bit
NAVDATA db. //NAV demo database
Linked Table --> WMProductionBatch
Column --> Issued
Data type --> Integer
A tabular form 'ProductionBatches' is created for WMProductionBatch linked table in NAV.
A menubuttion "Production Batch" is added to this form having menuitem as 'Card'.
The Card menu-item has OnPush() trigger defined as below:
Card-OnPush()
{
TestUnit.OpenProductionBatch(Rec);
//where TestUnit is a codeunit
//Rec is a record variable of type WMProductionBatch linked table
}
The function is defined as below:
OpenProductionBatch(VAR WMProductionBatch : Record WMProductionBatch)
{
//IssuedBefore is of type Integer
//IssuedAfter is of type Integer
IssuedBefore := WMProductionBatch.Issued;
//do some processing on batch
.....................
CLEAR(WMProductionBatch);
//Check if batch is issued
IF WMProductionBatch.GET(LocNo, BatchNo) THEN
[color=#FF0000]IssuedAfter := WMProductionBatch.Issued;[/color]
IF (IssuedBefore = 0) AND (IssuedAfter = 1) THEN
//do some task
}
The
problem i face is that when i process the batch, the Issued column (bit type) in WMDATA db. changes from 0 to 1.
This means that the mapping Issued column in NAVDATA db. should change from 0 to 1. But what happens actually is that when
IssuedAfter := WMProductionBatch.Issued;
is executed, the var. IssuedAfter (of type Integer) does not contain the current value as 1.
I tried debugging in VS2005 but i didn't got any idea as to why the bit value is not assigned to Integer value.
I need some help to resolve this.
Thanks
Hemant
Comments
Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
The LinkedInTransaction property is set to No.
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool