We have client that would like some limitations attached to the adding of A/R invoices. They use both Project and Profit Centre on sales documents. When adding an A/R Invoice that contains a specific profit centre, they would like that the user is told to also attach a project before proceeding. I'm thinking in terms of a stored procedure, but can't seem to figure out how to check for the correct profit centres, as the profit centre seems to only appear on the rows of the Invoice. (please correct me if I'm wrong).
I see that I may need to loop trough all rows and check each row - collect information of the rows that contain the profit centre in question and then trigger the error message - but I don't know how to do this. Can someone please guide me on my way?
Thank you very much.
Best regards, Runar.