We are using order planing from forever but with starting yesterday we get the following error while calculating order planing.
NAV ERROR
The expression Code cannot be type-converted to a Option value.
When I go into debbuger the line where all stops is in the table 246 - Requisition Line in record: Ending Time
I bolded the line where all stops.
TESTFIELD(Type,Type::Artikel);
IF ReqLine.GET("Worksheet Template Name","Journal Batch Name","Line No.") THEN
BEGIN
MODIFY;
PlngLnMgt.Recalculate(Rec,1);
GET("Worksheet Template Name","Journal Batch Name","Line No.");
END
ELSE
CalcStartingDate('');
IF CurrFieldNo <> FIELDNO("Due Date") THEN
SetDueDate;
SetActionMessage;
IF "Ending Time" = 0T THEN
BEGIN
MfgSetup.GET;
"Ending Time" := MfgSetup."Normal Ending Time";
END;
UpdateDatetime;
The search of the knowledge base didn't helped nor did any changes that i made to the code, GET statement looks o.k and debbuger doesn't reveal any code type data that should be option.
We are using NAV 5.0 sp1 localized to slovenian.
Comments
1: The primary key of the Requisition Line was changed, including a new option field
2: The ReqLine variable points to a different table, with an option as one of the primary key fields.