|
|
|
|
|
|
WHEN-NEW-RECORD-INSTANCE RESTRICTING ME! [message #239628 is a reply to message #238878] |
Tue, 22 May 2007 16:54   |
Basit
Messages: 38 Registered: April 2007
|
Member |

|
|
Hi,
Title *WHEN-NEW-RECORD-INSTANCE*
I have implemented this trigger on BLOCK LEVEL, actually
what i want is that,when i run my FORM a NEW ID (NUMBER)
should be generated automatically, this trigger is doing
fine till here, but when i run my FORM a new ID is GENERATED
even i did'nt do anything and every time i test my form i
lose a sequence generated number and it, and it is not
allowing me to execute query b'coz WHEN-NEW-RECORD-INSTANCE
Trigger takes it to Insert Mode,
i want to generate new ID number when i press INSERT RECORD
button in DEFAULT&SMARTBAR,now it should create it, not
every time i run my form.
Need ur reply.
Regards
Basit
|
|
|
|
|
|
Re: Automatically display a unique, new customer number for each new record? [message #239975 is a reply to message #239651] |
Wed, 23 May 2007 15:32   |
Basit
Messages: 38 Registered: April 2007
|
Member |

|
|
Hello,
as you said to use When-New-Record trigger for this, for Automatic ID generation, i used that too but the problem is that
, when i was using when-new-record-instance the problem was that , that when i run my form so new ID was generated and it was not leaving me to Execute Query, now with When-New-Record trigger one problem is solved b'coz it is leaving me to execute, but now the main problem is that when i run my form new ID is generated and lost, when i reach to last record then it fires their too. as i stated that i need to create a new Id number when i Press CREATE RECORD button in DEFAULT&SMARTBAR.
plz help me cause this is making me feel weak.
regards
basit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Automatically display unique ID for new record (merged) [message #242823 is a reply to message #238878] |
Tue, 05 June 2007 04:13   |
yahya_mukhtar
Messages: 12 Registered: June 2007 Location: pakistan
|
Junior Member |
|
|
hi basit
u can use the pre-insert trigger at block level to use the new id when the new record is inserted. in the pre-insert trigger u use
select nvl(max(emp_id),0)+ 1 into :item
from emp
u no need to generate the sequence bez it automatially reterive the max value and then add+1 into it.
try it and then enjoy .....
|
|
|
|
|
|