My Oracle Support Banner

Creating A Custom Dynamic Error / Warning Message (Doc ID 2437602.1)

Last updated on SEPTEMBER 14, 2020

Applies to:

Oracle Fusion Sales Cloud Service - Version and later
Information in this document applies to any platform.


Need to create a custom dynamic message through groovy.
You can create an error that is dynamic like so:

throw new oracle.jbo.ValidationException(‘MESSAGE: ’ + variableName)
Where you can specify variables name or API field names. This makes it dynamic. But the problem with this approach is it is meant to be used as an error message, and not a warning or a normal message, because it stops the whole process of being inserted into the database.

The other alternative the customer is using, is a normal message, like so:
But the only way to specify what the warning message should be, is through the Error Message field box above the groovy script editor. This is not dynamic since the customer can’t add variables name or API field name in this Error Message box. Just a static message.

The customer is looking for a way to show the user a warning message or a normal message that they can customize dynamically through groovy. The same way with "throw new oracle.jbo.ValidationException()" works, but the difference is that it should go through and not to be shown as an error.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.