how to check the duplicates while saving the form [message #204565] |
Tue, 21 November 2006 05:08 |
sudharshan
Messages: 48 Registered: November 2006
|
Member |
|
|
I have done like this --what happens
It saves the record then show the duplicate values
can you please help me? this is in oracle apps?
procedure validate_code is
v_curr_rec varchar2(30);
v_code sswms_rule_components.rule_component_code%type;
BEGIN
v_code:= :SSWMS_RULE_LINES_V.rule_component_code;
v_curr_rec := get_block_property ('SSWMS_RULE_LINES_V',CURRENT_RECORD);
FIRST_RECORD;
LOOP
If v_curr_rec <> get_block_property ('SSWMS_RULE_LINES_V',CURRENT_RECORD) THEN
IF v_code= :SSWMS_RULE_LINES_V.rule_component_code THEN
Fnd_Message.set_name('fnd','component rule code'||'' || v_code || 'already exists');
exit;
fnd_message.error;
App_Exception.raise_exception;
END IF;
END IF;
IF :SYSTEM.LAST_RECORD = 'TRUE' THEN
exit;
end if;
NEXT_RECORD;
END LOOP;
END;
|
|
|
Re: how to check the duplicates while saving the form [message #204707 is a reply to message #204565] |
Tue, 21 November 2006 17:43 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
In which trigger are you executing this code?
You say | this is in oracle apps?
| Please confirm that the question mark was entered in error and that you were stating that you are working with 'Oracle Applications'.
David
|
|
|