cancel
Showing results for 
Search instead for 
Did you mean: 

Strange error with SAPbobsCOM.PaymentTermsTypes

Former Member
0 Kudos

Hi all; in my code:

CondPagamento.GetByKey(Fattura.PaymentGroupCode)

If CondPagamento.StartFrom = pdt_MonthEnd Then

.....

if i have a lot of database, this code is good; in 1 database, this CondPagamento.GetByKey(Fattura.PaymentGroupCode) failed!

But if try with recordset:

Set vSere = Societa.GetBusinessObject(BoRecordset)

vSere.DoQuery ("SELECT T0.PayDuMonth FROM OCTG T0 WHERE T0.GroupNum =" & kKiave)

vSere.MoveFirst

i read in this table.

Why in this database with the object and methods i don't read in table but with the recordset i read?)

Do you have any idea?

Serema

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi all, i solved!

in my table OCTG, the primary key was disappeared!

And the method GetByKey test the primary key of table OCTG!

Best regards

Serema