cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to create Transaction Notification for transaction type Delete per users

328

Hi All

To use Delete on transaction type I understand I need to use 'IF NOT EXISTS'

(I guess it's because the record will not exists after the delete..)

How can I block some users from the DELETE option?

This condition dose not works :"H.UserSign2 =O1.[USER_CODE]"

(I guess it's because the record will delete .. so there isn't any data who was the user ..)

And am I right abut this mention guess?

Kind regards,

Hila

---------------

This is my TN that blocks all user from DELETE OOPR

IF @transaction_type IN ('D') and @object_type='97'

begin IF NOT EXISTS

(SELECT H.OPPRID FROM OOPR AS H inner join OUSR O1 ON H.UserSign2 =O1.[USER_CODE] WHERE H.DocEntry=@list_of_cols_val_tab_del and O1.[USER_CODE] = N'user2' )

BEGIN

SET @error = 1

SET @error_message = N'u can not delete this DOC'

END END

Accepted Solutions (0)

Answers (0)