on 09-03-2008 9:43 AM
Hi All
I want to disable the document the discount field on the sales order document.
How can I achieve this ? I don't want the users to be able to change the discount value in the document level.
Thanks
Hi Bongani
You must use Form settings for this. Unfortunately each user that you want to remove it for must be logged on and you must do it in their session.
Kind regards
Peter Juby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Petr
Thanks, please assist me with regards to the transaction notification ....
this is my code
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(25), -- SBO Object Type
@transaction_type nchar(1), -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
-- Return values
declare @error int -- Result (0 for no error)
declare @error_message nvarchar (200) -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'
IF @transaction_type = 'A'AND @object_type = '17'
BEGIN
If exists (SELECT T0.cardcode FROM ORDR T0 where T0.DiscPrcnt > 0 and T0.cardcode=@list_of_cols_val_tab_del)
begin
SET @error = 10
SET @error_message = N' Document can't be added, document discount must not be specified'
END
END
IF @transaction_type = 'A' AND @object_type = '2'
BEGIN
If exists (SELECT T0.cardcode FROM ocrd T0 where T0.FatherCard is null and T0.GroupNum = '1' and T0.cardcode=@list_of_cols_val_tab_del)
begin
SET @error = 10
SET @error_message = N'Consolidating BP not entered under accounting tab (Only cash customers)'
end
END
select @error, @error_message
END
You can manage all fields visibility with the help of Softline Solutions add-on "Interface Extension"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could easily hide this field using the Boyum IT product
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bongani,
I have the same as matter about disable discount changing. I use set Form Setting and untick in active column. After that, please right on click to menu bar so user can not change this discount.
I hope it will work.
Regards,
Agung
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would request you to try the following options:
Option 1. Use Authorization:
Step1: Access Authorization window. To access the Authorizations window, choose Administration -> System Initialization -> Authorizations .
Step2: for users (who are not superusers), set Max Discount to 0.01 (as per your max decimal places configured in General Settings-> Display).
Max. Discount: Specify the maximum discount that the user is authorized to enter in customer master records or sales documents.
Please note, this option will not work for superusers and will restrict discount entry in all sales documents (not only sales order as you require).
Option 2. Use Stored Procedure:
Step1: Access Authorization window. To access the Authorizations window, choose Administration -> System Initialization -> Authorizations .
Step2: for users (who are not superusers), set Max Discount to 0.01 (as per your max decimal places configured in General Settings-> Display).
Max. Discount: Specify the maximum discount that the user is authorized to enter in customer master records or sales documents.
Please note, this option will not work for superusers and will restrict discount entry in all sales documents (not only in sales order as you require).
*Option 2. SBOSP_TransactionNotification*:_
IF(@object_type='17') -- Sales Order object value: 17
BEGIN
-- if transaction type is equal to 'add' (please note this line is sql comment)
IF(@transaction_type='A')
BEGIN
-- if current business partner master - website field is having null/ less than 3 characters, then show error (please note this line is sql comment)
IF Exists (SELECT T0.cardcode FROM ORDR T0 where (T0.DocEntry=@list_of_cols_val_tab_del) and (T0.DiscPrcnt > 0))
BEGIN
set @error = 2001
set @error_message = N'You are not authorized to edit/ enter discount.'
END
ELSE
-- show successful message (please note this line is sql comment)
BEGIN
set @error = 0
set @error_message = N'Ok'
END
END
END
Hope the information is helpful to resolve your issue.
Good Luck.
Thanks & Regards
Satish
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.