This content has been marked as final. Show 2 replies
You can use a validation along the lines of:
Then within the vaildation you put the appropriate message.
SELECT NULL FROM xx_order_lines xol, xx_order_headers xoh WHERE xoh.order_header_id = xol.order_header_id AND xoh.order_header_id = &order_header_id AND xol.closed_date IS NOT NULL AND xoh.closed_date IS NULL;
But - I'd be tempted to make it part of your update process - either as a trigger on the lines table (have to be a bit clever to stop it mutating), or within the process itself. Ie, do the update on the lines, if all lines are now closed then flag the header as closed.
I solve problem with access Apex_application.g_fXX values. Create validation type Function returning error text.
Thanks /dev/null for your effort.