Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

D2k And Apex Developer Use Same Table, Problem with trigger

VedantMay 10 2011 — edited May 11 2011
Hi,

i have created an application.i have an old application which is created in D2k.Now i am creating this into APEX.
D2k Developers and me working on same table .

To insert new record into table D2K Developer use hard code .

now problem is, there are some columns in to table ,
ENTERED_BY  
ENTERED_DATE 
MODIFIED_BY   
MODIFIED_DATE 
for these columns i am using trigger in Apex and i am using Form with Report Type Pages
CREATE OR REPLACE TRIGGER "HR_EMP_ADDRESS_TRI"
BEFORE INSERT OR UPDATE ON HR_EMP_ADDRESS
FOR EACH ROW
begin
if inserting and :new.ADDRESS_ID is null then
select nvl(max(ADDRESS_ID),0)+1 into :new.ADDRESS_ID from HR_EMP_ADDRESS;
end if;
if inserting then
:new.ENTERED_BY:= nvl(v('APP_USER'),USER);
:new.ENTERED_DATE := sysdate;
end if;
if updating then
:new.MODIFIED_BY := nvl(v('APP_USER'),USER);
:new.MODIFIED_DATE := sysdate;
end if;
end;
/
Now problem is if D2K Developer create new record then that trigger fired .

Now i don't want to fired trigger to create new ID and to insert value of
ENTERED_BY  
ENTERED_DATE 
MODIFIED_BY   
MODIFIED_DATE 
How can i do this with form with reort.


Thanks
Vedant
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2011
Added on May 10 2011
6 comments
390 views