production journal validation

can someone please suggest me about setting a validation on production journal

That when I open the productional if the RPO has no component it should give an error and should not open the productional journal. else it should be working accordingly.

 

Thanks in advance.

Parents
No Data
Reply
  • On the Released prod. order subpage there is a function which opens up the production journal. In there you have to add your code something like below

    Prodline.reset;
    prodline.setrange(status,prodline.status::released);
    prodline.setrange("prod. order no.","no.");
    if prodline.findset then begin
    repeat
    prodcomp.rest;
    prodcomp.setrange("prod. order no.",prodline."prod. order no.");
    prodcomp.setrange("prod. order line no.",prodline."line no.");
    if not prodcomp.find('-') then
    error('Prod. order component cannot be blank for prod. order no. %1 line no. %2',prodline."prod. order no.",prodline."line no.")
    until prodline.next = 0;
    end;
Children
No Data
Related
Recommended