on 05-24-2011 3:45 AM
Hi All,
Is there a way using SP Stored Procedure to stop users from removing BOM ? But just someone can remove the BOM the others can't.
I have already try SBO_SP_TransactionNotification something like this:
DECLARE @User Nvarchar(8)
IF @object_type='66'
BEGIN
SELECT @user=T1.USER_CODE
FROM OITT T0 LEFT JOIN OUSR T1 ON T0.UserSign2 = T1.USERID
WHERE T0.Code=@list_of_cols_val_tab_del
IF @user='manager'
BEGIN
IF @transaction_type='D'
begin
set @error=1
set @error_message=N'You can't delete the BOM'
end
END
END
But it can't work!!! How can I do?
Thanks in advance,
Vanessa
Hi,
Try below..
IF @object_type='66' and @transaction_type = 'D'
BEGIN
if exist (SELECT T1.USER_CODE
FROM OITT T0 LEFT JOIN OUSR T1 ON T0.UserSign2 = T1.USERID
WHERE T0.Code=@list_of_cols_val_tab_del and T1.USER_CODE ='manager')
begin
set @error=1
set @error_message=N'You can't delete the BOM'
end
END
Regards
Deepak Tyagi
Edited by: Deepak Tyagi on May 24, 2011 7:41 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.