Condition: ((TO_NUMBER({entity.creditlimit}) - TO_...
# general
j
Condition: ((TO_NUMBER({entity.creditlimit}) - TO_NUMBER({entity.balance}))>0 and TO_NUMBER({salesorder.custbody_uhs_balance_due_with_credit})<(TO_NUMBER({entity.creditlimit}) - TO_NUMBER({entity.balance})) and TO_NUMBER({salesorder.custbody_uhs_balance_due_with_credit})<TO_NUMBER({entity.creditlimit})) How is the result of this True if entity.credit limit is 5000, entity.balance is 4000, and salesorder.custbody_uhs_balance_due_with_credit is 4000? 1. 5000 - 4000 = 1000 which is > 0, so T 2. 4000 > 5000 - 4000, so F 3. 4000 < 5000, so T How does T, F, T = T? (This is for Netsuite Sales Order Approval Workflow)
a
Try logging each conditional and each value separately.
j
Condition: ((TO_NUMBER({entity.creditlimit})-TO_NUMBER({entity.balance}))>0 Error while evaluating condition: ERROR: Invalid Expression
Forgot to remove a (, trying again.
Condition: TO_NUMBER({salesorder.custbody_uhs_balance_due_with_credit})<=(TO_NUMBER({entity.creditlimit})-TO_NUMBER({entity.balance})) How is this True if 4000 > (5000 - 4000)?
I even tried this: Condition: TO_NUMBER({entity.creditlimit})>(TO_NUMBER({salesorder.total})+TO_NUMBER({entity.balance})) Also shows True when it should be False, (5000 > 4000 + 4000 = F)
a
Does this need to be flipped?
j
No, Balance Due for Sales Order is 4000, Credit Limit is 5000, Balance is 4000. Balance Due (4000) is not <= Credit Limit - Balance (5000-4000) (or 1000) Yet it thinks it's true.
a
Have you tried logging the individual values? Try logging just the right side of the equation.
j
How do you log the values?--
a
Make a saved search, put those formulas as columns so you can see what each is returning.
j
salesorder.total is showing 0 on my saved search
{custbody_uhs_balance_due_with_credit} shows accurate value, and I've also used this variable with the same false outcome