4 Replies Latest reply on Jul 28, 2015 5:46 PM by ChrisThi10

    Selling price with red color in sales order lines form

    Reddy007

      Hi friends,

      How to achieve a particular sales order lines with selling price in red color .when it's line quantity is having more than 5..trying in both: form personalization and custom.pll...

      please help me on this cause...

        • 1. Re: Selling price with red color in sales order lines form
          Jagadekara

          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.

          • 2. Re: Selling price with red color in sales order lines form
            ChrisThi10

            Hi there, did something like this in a form....this is in custom.pll

            --------------------------------------------------------------------

             

               IF block_name = 'ORDERS_SUMMARY' THEN      
              
                   --FND_MESSAGE.SET_STRING('event_name :'||event_name);
                   --FND_MESSAGE.SHOW();
                   
                   IF NAME_IN('ORDERS_SUMMARY.ORDER_NUMBER') IS NOT NULL THEN      

                  -- For all the orders from summary, verify that there are urgent items 

                  FIRST_RECORD;
                  LOOP
              
                       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';         
                              END IF;         
                           END LOOP;
                        END LOOP;
                        
                         --If order include urgent item, change each item backgroundcolor  to red.

                         IF l_article_urgent = 'Y' THEN      
                        set_va_property('CUSTOM1',BACKGROUND_COLOR,'r255g0b0');        
                            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                           
                               Set_Item_Instance_Property(cur_itm,CURRENT_RECORD,VISUAL_ATTRIBUTE,'CUSTOM1');                     
                                END IF;
                          cur_itm := Get_Item_Property( cur_itm, NEXTITEM );          
                       END LOOP; 
                      END IF; --l_article_urgent                       
                 
                     IF (NAME_IN('SYSTEM.LAST_RECORD') = 'FALSE') THEN
                          NEXT_RECORD;
                     ELSE
                        EXIT;
                     END IF;
                   END LOOP;
                 
                 FIRST_RECORD; -- Put the cursor back at the top
                 END IF; --name_in orders_sumamry
                END IF; -- block_name orders_summary

            • 3. Re: Selling price with red color in sales order lines form
              Jagadekara

              Hi,

               

              I am not aware about custom.pll

              • 4. Re: Selling price with red color in sales order lines form
                ChrisThi10

                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.