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 11.1.10.0.0 and later
Information in this document applies to any platform.

Symptoms

On : 11.1.10.0.0 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;
  else
  return true;
}
else
  return true;



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

ERROR
-----------------------

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

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



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

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

Cause

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