Skip to main content
Solved

Custom Event and special characters


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
Did this topic help you find an answer to your question?

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

Thanks Charith, it works perfectly !!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings