cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict reference entered in the NumAtCard field from duplicating

Former Member
0 Kudos

Hi guys,

Is there a way to prevent the repetition or duplication of reference number manually entered by the user? Do you have a script or a stored procedure for this?

Thanks,

Yvette

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Choose Administration -> System Initialization -> Document Settings-> Per Document Tab.

Select a document, for example Sales order,

Now, in "When duplicated Customer Reference No. occurs", choose, "Block Release"

Former Member
0 Kudos

Thank you for your response, however, i cannot seem to locate the functionality that you've mentioned. It's not there

Former Member
0 Kudos

This functionality is available in 2005B and 2007B.

What is your Version?

keith_taylor2
Active Contributor
0 Kudos

this functionality is only available in the "B" version of Business One. In the "A" versions of Business One you would need to use a stored procedure and the transaction notification routine in SAP

Former Member
0 Kudos

Create a Stored Procedure to do this.

Former Member
0 Kudos

Yes, the version is 2007A PL47. Can anyone teach me the stored procedure for this?

Thanks,

Yvette

Former Member
0 Kudos

Check this Blog for the explanation regarding the stored procedure

[SP_Tranaction Notification Procedure Explanation|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e991e2b9-0901-0010-0395-ef5268b00aaf]

kvbalakumar
Active Contributor
0 Kudos

Use this Stored Procedure for A/P Invoice

Try in Test Environment and then in Live Database.

if @object_type = '18'
and (@transaction_type = 'A' or @transaction_type = 'U')
begin
declare @venno as varchar (100)
declare @vennam as varchar (100)
if (@object_type = '18')
begin
select @venno = NumAtCard, @vennam = CardCode from OPCH T0 where docentry = @list_of_cols_Val_tab_del
begin
if (@venno is not null)
begin
if 1!= (select count (docentry) from OPCH with (nolock)where (NumatCard = @venno) and (cardcode = @vennam))
begin
select @error = 10
select @error_message = 'Duplicate Vendor Ref Number!'
End
End
End
End
End

Regards,

Bala

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Yvette,

You may check this thread:

Thanks,

Gordon

Former Member
0 Kudos

Hi..........

Use Stored Procedure Transnotification.

Regards,

Rahul