Error when using Special Characters in Groovy Script

(Doc ID 2165633.1)

Last updated on MARCH 08, 2017

Applies to:

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


On : version, Opportunities

Opportunity Validation Rule returning Error

Validation Rule:

def varSpace = " ";
def varDec = ".";
def LinerSWGT = nvl(LinerSizeinches_c, 'N/A');
def LinerSize = nvl(LinerSWGT.substringBefore(varSpace), 'null');

if (LinerSWGT != 'N/A') {
  if (LinerSize.contains(varDec))
  return false;
  return true;
  return true;

Returning error for all LinerSizeinches_c that are not 'N/A'


Exception in expression groovy.lang.MissingMethodException : No signature of method:

subStringBefore() is applicable for argument types: (java.lang.String, java.lang.String) 

The issue can be reproduced at will with the following steps:
1. Add Groovy script having String functions which uses Special Characters

The issue has the following business impact:
Due to this issue, users cannot implement their business requirement


Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms