NAV_2009_SP1
I am trying to display an option field onto a report "Inventory Valuation". I have created globals and some code below.... My first problem is that the returned value is not the correct record for the Item No. When i ran the debugger the returned value is some random Item number so i am not getting the right item number associated with the record. Also the option field displays the number and not the name of the option .
LifeCycle.. DataType=record, SubType ItemLife cylce. and
LastLifeCycle data type = option.
in the custom table 'Item Lifecycle' the fields are Item No., Effective Date, Lifecycle Status, Comments
Item - OnPreDataItem()
LifeCycle.SETCURRENTKEY("Item No.", "Effective Date") ;
Item - OnAfterGetRecord()
IF LifeCycle.FINDLAST THEN
LastLifeCycle := LifeCycle."Lifecycle Status"
ELSE
LastLifeCycle :=0 ;