Is there a possibility in Rollbase 3.0 to send info or warning messages from ServiceInterface? Currently we are able to send error messages (possible in 2.2 as well) but sending an error message redrects the user to an error page.
Sorry for the late reaction, I missed your reply.
The scenario is the following:
- create an OpenEdge service object
- in the service interface on update method add a 'RETURN ERROR "123"'.
- update a record in Rollbase
The error message is displayed in a System error frame. This stops the update process and I am checking if there is a possibility to return the error message but let the user continue updating the record.
This is a custom message sent from OpenEdge service interface. This is from Update method (triggered by a save record on a OpenEdge Service object in Rollbase) and the code is
RETURN ERROR NEW Progress.Lang.AppError("You have not entered the hours for person 'M'",1).
The question I have is if there is another way to send this message and display it as standard Rollbase message wihout leaving the edit page.
These are business logic validations which are already defined in the Progress code. We don't have the possibility to move all the validations in Rollbase so I am checking if there is an option to use Rollbase error messages (default behaviour) but for validations made in the Progress code. Now this works - the messages are sent but the user is redirected from the edit page to the error page.
Is the workaround given by egarcia works for you? If not just let me know so I will look for another solutions for your issue.
The workarround from Edsel is indeed a workable solution for one of our objects. I was checking for a generic solution for this - in the workarround we do the same validation twice. This may impact the performance.
We were thinking on adding a 'Check' button that the user will press before save and use the same validations as for standard save and return the messages in a Rollbase Error box.
A question on this would be how to collect the data from the screen that should be the same as Rollbase is going to send for save. And here maybe it is a possibility to make it generic (the name of the object matches the temp-table name, for the fields we can probably use the integration name together with the object name)
If the check button will not redirect user to other page then collection of data can be done through using Rollbase browser-side API like rbf_getFieldValue(fieldName).