Skip to main content
Solved

Custom Event and special characters

  • March 6, 2024
  • 2 replies
  • 121 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!

  

2 replies

Charith Epitawatta
Ultimate Hero (Employee)
Forum|alt.badge.img+31
  • Ultimate Hero (Employee)
  • 1094 replies
  • Answer
  • March 7, 2024

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)
  • 28 replies
  • March 7, 2024

Thanks Charith, it works perfectly !!