Is it possible to add validation in Purchase Order, if GRN Posted on particular Purchase Order then the system should not be allowed to reopen or modify Purchase Order.
Yes it is possible In development environment Just go to purchase order page in the action page go to reopen trigger in that write the below code
PurchLine.Reset;
PurchLine.SETRANGE("Document No","No");
IF PurchLine.FindSet then Repeat
if PurchLine."Quantity Received"<>0 then
Error('You Cannot Reopen or Modify Purchase order');
UNTIL PurchLine.Next=0;
Yes it is possible In development environment Just go to purchase order page in the action page go to reopen trigger in that write the below code
PurchLine.Reset;
PurchLine.SETRANGE("Document No","No");
IF PurchLine.FindSet then Repeat
if PurchLine."Quantity Received"<>0 then
Error('You Cannot Reopen or Modify Purchase order');
UNTIL PurchLine.Next=0;
Answers
Yes it is possible In development environment Just go to purchase order page in the action page go to reopen trigger in that write the below code
PurchLine.Reset;
PurchLine.SETRANGE("Document No","No");
IF PurchLine.FindSet then Repeat
if PurchLine."Quantity Received"<>0 then
Error('You Cannot Reopen or Modify Purchase order');
UNTIL PurchLine.Next=0;
Regards,
Sachin