Monthly Archives: November 2010

Update on PLSQL validation

 

At the flexfields presentation at UKOUG, I promised an update on the PLSQL validation.

It turns out, that the only problem was a missing ” at the end of the function. Here is the code for the function: 

 

FND PLSQL ” declare

v_value varchar2(10) := :!value ;

v_num number;

begin

  v_num:=to_number(v_value);

  if mod(v_num,2)!=0 then

     fnd_message.raise_error;

  end if;

exception

   when others then

     fnd_message.set_name(‘FND’,’FND_GENERIC_MESSAGE’);

     fnd_message.set_token(‘MESSAGE’,’This is not a valid number’);

     fnd_message.raise_error;

end; “

 

So, use only the validate event:


 

And the parameter will validate correctly:

Good luck on your own experiments!