Why changesTo() function does't work?

jamesgo
Giga Contributor

I have a UI action to set change state to pending:


current.state = '-5';


then I use a business rule to check it:

if (current.state.changesTo('-5'))


why this doesn't work? the condition always return false...
11 REPLIES 11

Thanks Capa!


chaitu5
Kilo Contributor

current.state.changes()&&previous.state=='<previous state>';