My Oracle Support Banner

Error when using Special Characters in Groovy Script (Doc ID 2165633.1)

Last updated on OCTOBER 07, 2018

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

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
Symptoms
Cause
Solution


This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.