on 09-09-2008 2:21 PM
Hi all.
I have a request from client saying we should create a error message when ever users try to create new vendor and not populating DflAccount field with proper bank account number. I have made a start in SP Transaction Notification, but are having some issues when trying to limit it to only apply for BP of type vendors.The solution I have will actually occur whenever creating a new BP in the system. Maybe I need some modification saying this will only occur when BP is added and not when a BP is updated as well.
If @object_type = '2'
begin
Declare @PDflAccount as nvarchar(50)
Select @PDflAccount = DflAccount from OCRD where Cardcode = @list_of_cols_val_tab_del
If (@PDflAccount is null)
begin
set @error = 1
set @error_message = 'Please enter a bank account number before saving'
end
end
Appreciate all help.
Best regards, Runar Wigestrand.
try it as
If @object_type = '2' and @transaction_type = 'A'
begin
if exists ( Select top 1 1 from OCRD where Cardcode = @list_of_cols_val_tab_del and cardtype='S' and len(coalesce(DflAccount, '')) = 0)
begin
set @error = 1
set @error_message = 'Please enter a bank account number before saving'
end
end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try the following:
IF @object_type = '2' AND @transaction_type = 'A'
-- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.