Skip to main content

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 hstatus] = ‘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 

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


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.


Yes, seems to work! Thanks!