Rollbase 3.0 info/warning messages - Forum - Rollbase - Progress Community

Rollbase 3.0 info/warning messages

 Forum

Rollbase 3.0 info/warning messages

  • Hi,

    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.

    Thank you.

  • Hi Mihai,

    I need more information on this.
    Can you send some steps to replicate on how you are doing this?
    Thank you.

    Regards,
    Orchid
  • Hi Orchid,

    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.

  • Hi Mihai,

    May I know the exact error message you get when editing the record?

    Regards,
    Orchid
  • 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.


    Mihai

  • I do not believe so. Rollbase does not distinguish between errors that are "recoverable" (that is, a validation error on the dataset that the user could correct and resubmit) vs a System error that is not recoverable (eg. Db connection lost, or duplicate record exists, rest service not reachable, etc).

    Historically write errors were mostly all System ones and Rollbase "cancelled" the update and bumped you out of the edit page.

    I don't know a workaround (except coding the validation as a Rollbase trigger before the update). Maybe someone else has an idea ;-)=
  • Hi Mihai,

    Do you have a field that requires a value? Probably that could have cause the error based on the message that "You have not entered the hours for person...".
    Another way is since you are using Rollbase you can convert this validation into Rollbase field validation or validation trigger.

    Regards,
    Orchid
  • Hi Orchid,

    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.

  • Hello,

    Here is a possible workaround. (I have not tried it out yet myself.)

    The Business Entity could have an method defined as an INVOKE operation that you could call from the Rollbase form prior to saving the data (you can use the JSDO in JavaScript to do this). Perhaps, in this way, the form can validate the changes using the business logic validations in the Business Entity and provide the user with the information message.

    I hope this helps.
  • Hi mihai,

    Is the workaround given by works for you? If not just let me know so I will look for another solutions for your issue.

    Thanks,

    Orchid

  • Hi Orchid,

    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)

  • Hi mihai,

    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).

    Regards,

    Orchid

  • Hi Mihai,

    Where you able to get the values on the screen using rbf_getFieldValue()? If you have picklist you can use rbf_getPicklistCode().
    See other field manipulation in the documentation Chapter 14 > Field Manipulation
    http://documentation.progress.com/output/Rollbase/RB_User_Guide.pdf

    Hope this may help.

    Regards,
    Orchid