cancel
Showing results for 
Search instead for 
Did you mean: 

formatted Search to link cardcode to series in A/R invoice

Former Member
0 Kudos

Hi,

I want to create a formatted search to automatically change my series when the cardname or cardcode changes.

i.e i have numbering series for cash sales as cashsale, invoice as inv and another manual.

i want when i select cash sale it populates the series of cashsale and when i select any other it populates inv series.

please kindly help

Regards

Franc

Accepted Solutions (1)

Accepted Solutions (1)

former_member212181
Active Contributor
0 Kudos

Hi Franncis

Please try below query. Make changes in hard coded area mentioned below and save updated query in query manager and assign in AR Invoice Document numbering series field.

Declare  @CardCode varchar (20)

Select @CardCode = $[$4.0.0]

Select

  Case @CardCode

  When 'C20000' then '-1'

  else 67

  end [DocSeries]

1)Please give your Cash sale customer code instead of C20000

2) Instead of -1 please give series code for Cash sale

3) Instead of 67 please give series for normal Invoice

Note: You may need to change series codes if you create another document numbering series for next financial year

All the best

Unnikrishnan

Answers (2)

Answers (2)

wjmatamoros
Explorer
0 Kudos

Buen día.
Yo he hecho una FMS para poder seleccionar la serie de numeración basada en la condición de un UDF.
Si el valor es 'Y' selecciona la serie primaria, si es 'N' otra serie llamada Retención

SELECT
CASE 
WHEN T0."U_ForRet"= 'Y' THEN 'Primario'
WHEN T0."U_ForRet"= 'N' THEN 'Retencion'
END 
FROM OPCH T0 
WHERE T0."DocNum"= $[$8.1.0]
agustin_marcoscividanes
Active Contributor
0 Kudos

Hi

1. create all numbering series you need.

2. create a new UDF in business partner form.

3. create a FMS to read all numbering series and can choose one.

4. create another FMS in document to read the series in BP form.

5. SBO changes the numbering series and the document number.

Kind regards

Agustín Marcos Cividanes

frank_wang6
Active Contributor
0 Kudos

His requirement is simpler.

1. create UDF on BP, let's say U_Series.

2. Create FMS based on U_Series, something like this.

SELECT U_Series FROM ORDR WHERE CardCode = $[ORDR.CardCode]

3. Apply this FMS to Series field on Sales Order.