Item Tracking Error.

Hi All,

I have a requirement in sales orders that the sales order cannot be send for approval request if the item tracking serial No.

not entered. please advise me where and what to write the error message.

What did you try till now?

You have to try yourself first and tell us if you are struct somewhere in process…

Hi,

You need to understand How Approval process works as well as Serial no functionality of Navision.

Standard Navision checks serial no when you are posting the sale order.

You need to write code on Sent for Approval button for checking the same.

Hi mohana,

I have tried in writing code in the form in On Push of send approval request. here i am pasting the code which i have tried

{

SalesLine.RESET;

SalesLine.SETRANGE(SalesLine.“Document Type”,Rec.“Document Type”);

SalesLine.SETRANGE(SalesLine.“Document No.”,Rec.“No.”);

SalesLine.SETRANGE(SalesLine.Type,SalesLine.Type::Item);

IF SalesLine.FINDFIRST THEN REPEAT

item.GET(SalesLine.“No.”);

//IF item.“Item Category Code” <> ‘’ THEN (I am struck here)

//ERROR(‘Serial No. Does not exist’);

UNTIL

SalesLine.NEXT = 0;

}

Please review the above code whether it is correct or not. and please suggest me how to do this.

You are trying to check whether Item card has Item Category declared or not.

I guess you need to check whether Serial No. is declared for Item in Sales Line?

Right?

then check the table where NAV stores id we enter Serial No. for Sales Line and check in that table…

I am trying to check two conditions.

  1. whether the Item has item tracking Code assign

  2. if the item has tracking code then i need to check whether the serial No. is assigned or not.

I hope from the above code i have checked the first condition. But i am struck in how to check the second condition before sending for the approval request

In the above code you are checking the wrong field

it should be Item Tracking Code not Item Category Code…

Ohh I thought to check the item tracking Code but i accidentally picked category code [*-)] … Thank you very much

Please tell me how to check whether the serial No. entered or not…

Go to Sales Line and Manually enter serial No. for Line and check in which table is it storing…

similarly check the same thing via coding…