04-07-2011 01:41 PM
I am doing some validation on the beforeUpdate and BeforeInsert Business Rules.
If the validation Fails.. I am throwing a ValidationException ( throw new ValidationException() )
This code was in place before the New Sdata Mobile Client existed, but is now causing and Issue the mobile client.
The message is never raised to the user.. Instead all it says is "A server error occurred while requesting data"
Am i doing something wrong? What is the proper way of having a unified business layer?
01-07-2013 10:41 PM
Anybody has an update on this issue? I am having this issue on SLX 8 (Gold).
I added an Event to the Account's OnBeforeUpdate to throw an Exception if a given field is blank. This works well on the Web Client.
I have done some research and found this entry on the Argos SDK list of issues that fits exactly this issue.
Basically, the Mobile Client is not recognizing this response as a Validation Message because the HTTP Status Code is 500.
The response itself does include the actual Exception message, but it is never displayed. A Standard Error Message is displayed on its place: "A Server error has ocurred".
I am inclined to Update my copy of the "Edit.js" on the Argos SDK to handle this particular Instance differently to display a correct Error Message from the Validation Rule.