I have a page with 5 models. One of the models has a numeric value (double). When I enter an invalid value (string), I don’t get any error message. The model saves successfully and just blanks out the number value.
I tried to “Add on-error action” to the button without any luck.
I want to avoid writing the whole save in Javascript.
Well. I think I get what you’re asking. You’ve got a snippet that does attempts to update field values. Then an action to save is set. If you know which field is supposed to be a numeric value, why not just make sure it’s a number before finishing the snippet.
Can you reproduce this outside of your page i.e. in another page? If so, post sample XML here.
Amr, why are you not using normal Salesforce Validation here? Skuid will post any validation error message on your page. No coding needed.
If you make it a required field, you will get field validation. Otherwise, either add server side validation per Rob, or implement a custom field renderer (Rob would this work too?).
And there it is. The “Nuts” as they’d say in poker.
You could do validation in a custom field renderer - to achieve a client side behavior - but the server side solution is so much easier… ie no code.
Thanks all for your replies. Sorry for being away for time difference (I am in Australia).
I replicated the same in a simple page with one model. Kindly note here there is no coding involved. Only out of the box save.
I found a workaround by adding validation rule on Salesforce side.
NOT( ISNUMBER(Text(ts2__Years_of_Experience__c )))
I hope there is a better solution.
Glad you were able to get this working. Enjoy your Austrailan summer.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.