cancel
Showing results for 
Search instead for 
Did you mean: 

Restricting modifying the Sales Order

Former Member
0 Kudos

Hi Expert,

Hope you can help on this...

I have to restrict specific user to modify the Sales Order where Series='SO-BOM', they can only modify this Sales Order with authorization from manager or from specific user....

Can i do this on TransactionNotification from StoredProcedure?

Thanks,

Richard

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Check this first:

IF @transaction_type = 'U' AND @object_type = '17'

BEGIN

If exists

(Select T0.DocEntry

ORDR T0

INNER JOIN NNM1 T1 ON T0.Series=T1.Series

Where T1.SeriesName='SO-BOM' AND T0.DocEntry = @list_of_cols_val_tab_del)

Begin

Select @error = 17, @error_message = N'Sales Order can not be modified!'

End

END

If it works, you can add user codes into it.

Thanks,

Gordon

Former Member
0 Kudos

Thanks Sir for the script, it works at sales order,,,,, but where i can insert the authorization? i created a username sales1, this user has the authority the unlock the restriction.....where can i insert the authorization...

Thank you for the support

former_member206437
Active Contributor
0 Kudos

Hi Chard

You can insert this piece of script in Gordon's query by little bit change :

T0.DocEntry = T2.DocEntry inner join OUSR T1 on T0.UserSign = T1.USERID 
	where T0.DocEntry = @list_of_cols_val_tab_del and T1.USER_CODE != N'manager')

Giridharan V

Former Member
0 Kudos

Thank you so much.......

Richard

Answers (0)