on 2011 Mar 07 2:25 PM
Hi
I want that no user except manager should be able to update Delivery & Return in Sales
Thanks
Hi,
Try this:
IF @transaction_type = N'U' AND (@Object_type = N'15')
BEGIN
IF exists (SELECT T0.DocEntry FROM ODLN T0 Inner JOIN OUSR T1 on T0.UserSign=T1.USERID
WHERE T0.UserSign<>1 AND T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
Select @Error = -5002, @error_message = 'You are not authorized to update delivery Note !!'
END
END
IF @transaction_type = N'U' AND (@Object_type = N'16')
BEGIN
IF exists (SELECT T0.DocEntry FROM ORDN T0 Inner JOIN OUSR T1 on T0.UserSign=T1.USERID
WHERE T0.UserSign<>1 AND T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
Select @Error = -5003, @error_message = 'You are not authorized to update Return !!'
END
END
check that user sign for manager is 1 . run select * from OUSR query and check USerId column for manager
Thanks,
Neetu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
109 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.