cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Auto increment value while Inserting data in User Defined Table?

mucipilbuga
Participant
0 Likes
1,036

Hi,

I use below code to insert one recort in to User Defined Table (No Object) with B1 SDK

oUserTable = vCmp.UserTables.Item("BIRIMLER")
oUserTable.Code = "2"
oUserTable.Name = "Deneme2"
oUserTable.UserFields.Fields.Item("U_stok_kod").Value = "Deneme"
oUserTable.UserFields.Fields.Item("U_stok_birim").Value = "Deneme2"
oUserTable.UserFields.Fields.Item("U_ikinci_birim").Value = "Deneme3"
oUserTable.UserFields.Fields.Item("U_katsayi").Value = "333"
retval = oUserTable.Add()

I think when you create User Defined Table, Code and Name values has beem automaticly created.

How can arrange Code field autoincrement value? Because Code field is not important for me. But I need it to get exact line information.

Can I assign it auto increment value?

Regards,

Mucip:)

View Entire Topic
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi mucipilbuga,

You can use the table of No Object with Auto. Increment type.

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

mucipilbuga
Participant
0 Likes

Dear Ankit CHAUHAN,

OK. Thanks...

Regards,

Mucip:)