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)
Tagged:
0