cancel
Showing results for 
Search instead for 
Did you mean: 

Auto Increment of BP code

Former Member
0 Kudos

Hi,

Is it possible to get the next code while creating new BP master. If yes can anyone help me in this scenario.

Code which we follow are in this manner Customer: C000001.... and Vendor: V000001

Regards

swapnil

View Entire Topic
Former Member
0 Kudos

Hi SWAPNIL,

Save the following query


IF $[$40.1.0]='' (
   SELECT 'Select BP Type') 
ELSE (
   SELECT T0.CardType + RIGHT('00000' + LTRIM(RIGHT(MAX(T0.CardCode), 5) +1), 5) 
FROM OCRD T0 
WHERE T0.CardType = $[$40.1.0] GROUP BY T0.CardType)

And add it as a Formatted Search in the BP Code field.

Regards,

Vítor Vieira

Former Member
0 Kudos

Hi.

thanks for reply.

1. Query is working fine. But in this for supplier increment starts with 'S' instead i want the auto incrment to start with V00... how shall i do the same.

2. Also when i select lead in the BP master no number is reflected in BP code. Pls guide how to do the same for both the cases.

swapnil