Error while calculating order planing

santa100santa100 Member Posts: 8
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

  • ShedmanShedman Member Posts: 194
    There are two options:
    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.
  • santa100santa100 Member Posts: 8
    Yep I also thought that i had change something by mistake but when I look at dates in object designer there are no changes in the time period of last 7 days in anything else but in reports, changed reports also don't affect anything, they just show data.
Sign In or Register to comment.