You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy Script Issue

Received Response
20
Views
2
Comments
edited Jan 7, 2019 10:08AM in General Technical Discussions 2 comments

Summary

Problem entering a groovy script

Content

Hello all,

I have the below script that when pressing validate I got the below error. Can anyone help please?

if (isAttributeChanged('Assigned To') && AssigneePersonName == 'bala.gupta')
return StatusCd == 'In Progress-Agent'; 
else
  if (isAttributeChanged('Assigned To') && AssigneePersonName == 'Lisa Jones')
  return StatusCd == 'In Progress-Senior';
else
  if (isAttributeChanged('Assigned To') && AssigneePersonName == 'John Dunbar')
      return StatusCd == 'In Progress-Manager';

Error generated when pressing Validate:

Error(1,1) : An internal compiler error occurred: org.codehaus.groovy.syntax.RuntimeParserException: Cannot use return statement with an expression on a method that returns void . At [3:1] bc4j.null.gs.groovy See the logs for the error stack.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!