custom defaulting rule with pl/sql is not working
I have set up defaulting rule as picture and pl/sql below.
The function keep return XXNO_VALUE when I go to create sale order.
It seems ONT_HEADER_DEF_HDLR.g_record.SOLD_TO_ORG_ID is return no value. This is on EBS R12.2.3
Any suggestion please help.
CREATE OR REPLACE PACKAGE BODY APPS.viv_oe_default_pkg IS
FUNCTION get_invoice_comments
( p_database_object_name IN VARCHAR2
,p_attribute_code IN VARCHAR2)
RETURN varchar2 IS
l_header_id NUMBER;
l_invoice_to_org_id number;
l_sold_to_org_rec OE_Order_Cache.Sold_To_Org_Rec_Type;