Skip to main content
Solved

Custom Event and special characters

  • Mar 6, 2024 4:31 PM UTC
  • 2 replies
  • 150 views

Forum|alt.badge.img+8

Hello Everybody,

In a Custom Event, the content of a variable is automatically filled by the system. This means that, if in a variable there is a single quote, the Action fails.

For example an Event that is fired when the master part is modified and it requires the description.

 

DECLARE
  description_  VARCHAR2(32000) := '&NEW:DESCRIPTION';
  ...

BEGIN

  ...

 

If the description is something like “This is the ‘description’”, the Action fails with an SQL sintax error.

Is it possible to prevent such error ?

Best answer by Charith Epitawatta

Hi @luca.puccini,

Instead of using single quotes, please try declaring the variable as below

DECLARE
  description_  VARCHAR2(32000) := q'[&NEW:DESCRIPTION]';
BEGIN

Hope this helps!

  

View original

2 replies

Charith Epitawatta
Ultimate Hero (Employee)
Forum|alt.badge.img+31

Hi @luca.puccini,

Instead of using single quotes, please try declaring the variable as below

DECLARE
  description_  VARCHAR2(32000) := q'[&NEW:DESCRIPTION]';
BEGIN

Hope this helps!

  


Forum|alt.badge.img+8
  • Author
  • Do Gooder (Customer)
  • Mar 7, 2024 7:19 AM UTC

Thanks Charith, it works perfectly !!