forms:Trigger bad bind variable

oracle 10g
Im trying to run a trigger in insert button in oracle forms. It did work in sql developer, but doesnt compile in forms builder

I get the message:
error 49 at line 4, column 6
bad bind variable 'customer.text_buyerid'

I compared names of customers tried to run it as :buyerid as well. Similar code works for other block so cant understand whats wrong...
Ive also tried to put the trigger in customer block in buyerid item, but no luck again...

I thought it might be different data format as in sql dev ive got customer as varchar2(6) and in forms char(7), but cant be bothered to upload 23k lines of data to change varchar to char
trigger from forms button:
CLEAR_FORM; 
:GLOBAL.mode := 'INSERT'; variable
SELECT chr(66)|| custseq.nextval
INTO :customer.text_Buyerid
FROM DUAL;

thats the same trigger but in customer block in buyerid item:
IF :SYSTEM.RECORD_STATUS = 'NEW' AND :buyerid IS Null THEN  
SELECT chr(66)||custseq.NEXTVAL INTO :buyerid FROM DUAL;
   END IF; 

trigger from sql dev:
create or replace TRIGGER NEWCUSTOMER
BEFORE INSERT ON CUSTOMER
FOR EACH ROW 
WHEN (new.BUYERID IS NULL) 
BEGIN
 SELECT chr(66)|| CUSTSEQ.NEXTVAL   
 INTO   :new.buyerid   
 FROM   dual; 
END;

Open in new window

yahoo80Asked:
Who is Participating?
 
flow01Commented:
maybe
INTO :customer.Buyerid
in stead of
INTO :customer.text_Buyerid
?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.