Hi Community
I have created a Persistent custom field in Sales Basic Data → Salesman to enter Sales manager of each salesman.
I have created another custom field in Customer order → Misc Order info tab and I want to update Sales manager’s id into that custom field using an event.
i created an event to achive that but i am getting no result. Customer order doesn’t fire any error too.
Can you let me know where the issue is ?
DECLARE
SalesM_ VARCHAR2(20);
pragma autonomous_transaction;
BEGIN
SELECT CF$_SALES_MANAGER
INTO SalesM_
from SALES_PART_SALESMAN_CFV
WHERE salesman_code = '&NEW:SALESMAN_CODE';
IF CUSTOMER_ORDER_API.Get_Authorize_Code('&NEW :ORDER_NO') = 'IWT' THEN
UPDATE Customer_Order_Cft
SET CF$_S_MANAGER = SalesM_
WHERE rowkey = (SELECT rowkey
FROM Customer_Order_tab
WHERE order_no = '&NEW:ORDER_NO');
END IF;
END;
Best answer by anmise
View original