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 View Criteria – IS NULL Condition Not Working

Hello Experts,

I’m working on a Groovy script in Oracle Sales Cloud where I need to query a custom object (CreditCategory_c) using multiple conditions. Specifically, I want to handle scenarios where fields can either match the transaction value or be null.

Here’s the piece of my script snippet:

def credCatVO = newView('CreditCategory_c')
def credCatVC = credCatVO.createViewCriteria()

credCatVO.appendViewCriteria("((State_c = '${trxState}' or State_c is null)
and (Region_c = '${trxRegion}' or Region_c is null)
and (Hub_c = '${trxHub}' or Hub_c is null)
and (Branch_c = '${trxBranch}' or Branch_c is null)

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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