Check Dimension

Hi Everybody

 

I write code check "Shortcut Dimension 2 Code" on page Sales Order (page 42)

Purpose of the check and compel the user to input data dimension. (not blank)

Release - OnAction()

IF SalesLine.GET("Document Type","No.") THEN
  BEGIN
     BrandCode:=SalesLine."Shortcut Dimension 2 Code";
         IF BrandCode='' THEN
         ERROR('Brand Code " "');
  END;

But still not work. Please help me technic

Thanks very much

  • In the Release sales document codeunit you can just add the below code, this should take care of your issue.

    salesline.reset;
    salesline.setrange("document type","document type");
    salesline.setrange("document no.","no.");
    if salesline.findset then begin
    repeat
    salesline.testfield("shortcut dimension 2 code")
    until salesline.next = 0;
    end;
  • In reply to sbhatbng:

    Thanks you sbhatbng
Related