on 06-06-2011 3:29 PM
I am trying to stop entering Duplicates for Customer Reference No during Sales Order Entry by a formatted search.
SQL Query
Select case when NumAtCard in (Select NumAtCard from ORDR where NumAtCard in ('test11'))
then '' else NumAtCard end from ORDR where CardCode = 'AQU001'
Select case when NumAtCard in (Select NumAtCard from ORDR where NumAtCard = '$[ordr.NumAtCard]')
then ' ' else ''$[ordr.NumAtCard]'' end from ORDR
The above query is not working in formated search, I must be missing some thing, please advise?
Regards,
Mohan
Hi,
It is not possible by Formmatted search ti prevent users entering duplicate reference numbers on order, use below transaction notification script to block it:
if @object_type = '17' and (@transaction_type in ('A' ,'U'))
begin
declare @RefNo as varchar (100)
declare @CardCode as varchar (100)
if (@object_type = '17')
begin
select @RefNo = NumAtCard, @CardCode = CardCode from ORDR T0 where docentry = @list_of_cols_Val_tab_del
begin
if (@RefNo is not null)
begin
if 1!= (select count (docentry) from ORDR where (NumatCard = @RefNo) and (cardcode = @CardCode))
begin
select @error = 10
select @error_message = 'Duplicate Customer Reference Number!'
End
End
End
End
End
The documentation regarding the SBO_SP_TransactionNotification procedure
can be found in the following link:
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 |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
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.