Skip to main content
Solved

Pass message to indicium


Blommetje
Forum|alt.badge.img+13

Hi, 

I have a subroutine ‘delete_project’. When I call this, it deletes the project. When a record has Referential Integrity and ‘No Action’, Indicium nicely respond with a base64 encoded message that it ‘ can’t delete due to Related <tablename>’ . So far, all good. 

However, when I don’t want to delete the project because it has for example a [status] = ‘active’ - so deleting is not allowed. In the gui we can display a message. Or with importing some data from an API, at the end we show a success/failure message; perhaps with a Process flow.  

Is it possible - and if so, how - to pass these messages through Indicium? If a user connects with the end-point, it will make a lot more sense then a 422 - unprocessable entity when something is not allowed, or processed correctly.

Thanks! 

Blommetje 

Best answer by Blommetje

Yes, seems to work! Thanks!

View original
This topic has been closed for comments

Remco Duijsens
Vanguard
Forum|alt.badge.img+1

For this you want to use the SQL RAISERROR function in your stored procedures. 

For example: 

If @status = ‘active’

begin

   raiserror()

end

If you want to know more about this function you can check https://learn.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql?view=sql-server-ver16


Forum|alt.badge.img+4

Hello Blommetje,

I would recommend using tsf_send_message, which uses raiserror, but allows you to send translated messages that are managed in the SF.

I hope this helps.


Blommetje
Forum|alt.badge.img+13
  • Partner
  • November 28, 2023

Yes, seems to work! Thanks!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings