Skip to Content
0
Former Member
Oct 06, 2014 at 12:47 PM

problem on SBO Transaction notification

287 Views

Dear all,

I wrote one simple SP with SPTransactionNotification for delete transaction type in user define object with object type 'Master data'.

DECLARE @CALC NVARCHAR(1)

SELECT @CALC = U_Calculated

FROM [@MSD_PERIOD]

WHERE [@MSD_PERIOD].Code = @list_of_cols_val_tab_del

IF @object_type = N'MSD_Period' AND @transaction_type = N'D'

AND @CALC = N'Y'

BEGIN

SET @ErrorID = 2

SET @ErrorMessage = 'Please update this Document' +@list_of_cols_val_tab_del + '_' +@transaction_type

END

But this SP with true conditions do not work and do not send any Error Message and so delete data.

if I clear condition "@CALC = N'Y'" then SP send Error Message and work properly 'Please update this Document139301_D', But with the addition of this condition with true value don't send any Error Message!

when adding Variable "@CALC" to @errormessage , Return an error message is empty and Just return the error number= 2.

IF @object_type = N'MSD_Period' AND @transaction_type = N'D'

-- AND @CALC ='Y'

BEGIN

SET @ErrorID = 2

SET @ErrorMessage = 'Please update this Document' +@list_of_cols_val_tab_del + @transaction_type + @CALC

END

As if the record is already deleted but record is exists!

Regards

Shayan