How you tried form personalization?
I don't know about sales order form, but I done same type of requirement in item form long back through form personalization.
Hi there, did something like this in a form....this is in custom.pll
IF block_name = 'ORDERS_SUMMARY' THEN
IF NAME_IN('ORDERS_SUMMARY.ORDER_NUMBER') IS NOT NULL THEN
-- For all the orders from summary, verify that there are urgent items
l_header_id := NAME_IN('ORDERS_SUMMARY.HEADER_ID');
l_article_urgent := 'N';
--Compare order item to those include in XX_URGENT_ITEM value set.
FOR r_art_com IN c_art_com(l_header_id) LOOP
FOR r_art_urg IN c_art_urg LOOP
IF (r_art_com.art = r_art_urg.art) AND (l_article_urgent = 'N') THEN
l_article_urgent := 'Y';
--If order include urgent item, change each item backgroundcolor to red.
IF l_article_urgent = 'Y' THEN
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
-- for all the block item from ORDERS_SUMMARY, assign visual custom1 attribute to it.
-- We must exclue button and block item that are not on the canvas
WHILE ( cur_itm IS NOT NULL ) LOOP
cur_itm := cur_block||'.'||cur_itm;
IF (Get_Item_Property(cur_itm,ITEM_TYPE) != 'BUTTON') AND (Get_Item_Property(cur_itm,ITEM_CANVAS) IS NOT NULL) THEN
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END IF; --l_article_urgent
IF (NAME_IN('SYSTEM.LAST_RECORD') = 'FALSE') THEN
FIRST_RECORD; -- Put the cursor back at the top
END IF; --name_in orders_sumamry
END IF; -- block_name orders_summary
I am not aware about custom.pll
Custom.pll is a Library that is attached to each form. You use this Library in order to build extension to the existing form. For instance, if you want to change a LOV in a field, apply a color to a cell, you might use this functionnality to do it. Form personalization is capable of doing thing, but is limited.
In order to accomplish what you're trying to do (changing color), you must alter the code. Best pratices suggest that you DO NOT modify any Oracle forms, but if you have to change the behaviour, you must use either form personalization or custom.pll Library.