convert to uppercase on business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2013 08:42 AM
I have a request to convert certain fields to all uppercase. It looks like the toUppercase() function does not work on a business rule, and it's necessary to use a BR for this since a lot of the field data will come in through bulk imports.
Does anyone have any suggestions on how to convert a field value to all uppercase in a business rule?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2013 09:09 AM
Hmm, this worked fine for me in a "before update" Business Rule:
current.short_description.toUpperCase();
Are you sure your Business Rule is running?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2013 09:11 AM
I tested it out on description, not short_description. I wonder if it's an issue with that field type. Thanks for the feedback.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2013 09:28 AM
I just tested and confirmed that it works on Description.
Before business rule - on insert or update
Condition: current.description != current.description.toUpperCase()
Script:
current.description = current.description.toUpperCase();
Also see attached screenshot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2013 09:11 AM
Ah wait, you typed "toUppercase()". Is that what you used? The correct method is "toUpperCase()".