0

Issue with custom error message display using SDK

I am trying to show a custom error message using RolledBackException in SDK after a certain workflow task completion based on some business logic. I was expecting that the error message will be displayed in the Vault UI after clicking the Task Complete button. But instead of showing the error in the Vault UI in dialog box, I am seeing "Server Having problem". And if I click the " i " info icon of server having problem dialog , then I am able to see the custom error message that the sdk code threw. is there any way, that I can display custom error message to the user in the Vault UI rather than in "Server having Problem" window. I have deployed the code as an entry action.

3 comments

  • Avatar
    John Tanner Official comment

    Hi Rohit,

    Based on what you are experiencing, it looks like this may be a defect. Please could you open a support ticket (https://support.veeva.com/hc/en-us/articles/360001873433-How-to-Open-a-Ticket-with-Veeva-Product-Support-), providing details of both the environment and the logic being executed, so it can be investigated further.

    Thanks

    John

  • Avatar
    Rohit Roychowdhury

    Hi John,

    I have already raised a veeva ticket for this issue. They are telling to use .setError method rather than RolledBackException. But I need to use RolledBackException only as if the transaction failed, then as per ACID property, the entire thing should be rolled back to int original form. And also , .setError method is applicable to RecordTriggerContext--inputRecord : recordTriggerContext.getRecordChanges(). But I am using sdk for Document Action.Is there any way to achieve the same functionality of .SetError method in Document Action?

  • Avatar
    Mary P

    I have opened a ticket on behalf of the customer.  Rohit should receive an email notification with a link to the ticket.

Please sign in to leave a comment.