Unable To Use SalesStage Names In Groovy Code (Doc ID 2286488.1)

Last updated on JULY 14, 2017

Applies to:

Oracle Fusion Sales Cloud Service - Version 11.1.11.1.0 to 11.12.1.0.0 [Release 1.0]
Information in this document applies to any platform.

Goal

When use the SalesStage Names in Groovy code, the triggers are not working, but when use the SalesStageIds, it is working correctly.
For testcase, Using 4 sales methods to write the code, it is difficult to use 4 salesStageIds for 1 particular sales stage in Groovy code.
need a way to use sales stage names.
 

 

Code tried :

def curval = SalesStage
def origval = getOriginalAttributeValue("SalesStage")
def curvalID = SalesStageId
def origvalID = getOriginalAttributeValue("SalesStageId")
println("current SalesStage=" +curval)
println('Original SalesStage=' +origval)
println("current SalesStageID=" +curvalID)
println('Original SalesStageID=' +origvalID)
if(origval!='En Autorización Autos' && curval=='En Autorización Autos')
{
println('inside if')
setAttribute('DateAuthorizationAutos_c',now())
}

The Run time messages show as

current SalesStage= 01 Stage One

Original SalesStage= 01 Stage One

current SalesStageID= 300000001234567

Original SalesStageID= 300000001234569

Solution

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