Why changesTo() function does't work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2013 08:18 AM
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2013 09:20 AM
Breaking up worked... thanks! But why below doesn't work? though the wiki says changesTo needs object as its input parm, I do see a lot out of box business rules are working with values like below...
current.state.changesTo(-5)
CapaJC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2013 12:40 PM
Good job with that one Capa! But I'm with the OP on this one, I'm curious why it isn't working as a single condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2013 09:36 AM
I'm not sure, but my guess is that it's something specific to the fact that 1) the choice list is an *integer* choice list, and 2) it's a negative value. 'cuz I've seen changesTo work in many other situations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2013 01:08 PM
Fine, you made me go digging 🙂 And my guess was right.
PRB574159: GlideElement.changesTo method gives wrong answer for a negative integer choice list value
Fixed for Calgary, so before that it'd be broken. Looks like it didn't make it into Calgary release notes because there were no customer Incidents logged against it.
So if you're on Calgary or later, and this is *still* broken, I'd recommend logging an Incident Could be a slightly different failure mode not covered by the fix for PRB574159.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2013 01:12 PM
You rock! yes we are still on berlin.
CapaJC