When in the invoice there is a package cost (its Sales Line No. is ‘CSOM_HU’) and in Sales Header the Package Tracking No. is blank I should send a warning message, that Package Tracking No. must be filled out.
I tried to write some code in OnValidate() trigger of No. field, but it was not good. There was no message at all.
IF “Sales Line”.“No.” = ‘CSOM_HU’ THEN
MESSAGE(‘Package Tracking No. must be filled out’);
Yes, I would like exactly what you wrote, except one thing. The client wants only a warning about it, and then his decision is to fill it out or not, because it can happen that he doesn’t want to write a Package Tracking No.
Can you help me what is the right field and trigger in this case?
Just to clarify the problem was , that she had been using a global variable not the actual record. Which is not shown here.
Anyways
this was the code that had worked :
F ((“No.” = ‘CSOM_HU’) AND (SalesHeader.“Package Tracking No.” =’’)) THEN BEGIN
IF NOT CONFIRM(‘Package Tracking no. is not filled, Do you want to continue’,FALSE) THEN EXIT;
END;