Salesline field validation

mo_xmo_x Member Posts: 50
Hello everibody, I have a Salesorder that i post as "Ship". The salesline of the order can be modified by standard. How can i code so that the "quantiity" field on salesline cannot be changed, but others can. Is it possible to make some kind of error exception?. I'm trying to implement the solution using codeunit.

Best Answer

Answers

  • JohnHunterJohnHunter Member Posts: 45
    Table 37 Sales lines, OnModify:

    Something similar how ReserveSalesLine.VerifyChange(Rec,xRec) works:

    IF (Quantity <> xRec.Quantity) AND ItemExists(xRec."No.") AND ("Quantity Shipped" <> 0) THEN
    FIELDERROR(Quantity);
  • mo_xmo_x Member Posts: 50
    Thnx for reply JohnHunter. But this throws error for all the field. I just want for the quantity.
  • mo_xmo_x Member Posts: 50
    Thanks John, that helped
Sign In or Register to comment.