I would like to use SBO_SP_TransactionNotication to ensure that a Business Partner can't be removed where there are Related Activities.
I put the code below in the stored procedure but it is not working.
I have successfully used a variation of this code to ensure a Business Partner can't be removed if there is a Sales Quotation for the BP.
The only thing that I have noticed is that when a BP is removed any associated records are also deleted from OCLG.
declare @Delete as varchar(10)
select @Delete = case when (select 1 from OCLG where cardcode = @list_of_cols_val_tab_del) = 1 then 'NOT OK'
else 'OKAY' end
if @Delete <> ('OKAY')
set @error = 1
set @error_message = 'Can not delete BP with activities !!!'