monica1
17th March 2005, 14:25
I try to create a record in tfacp100 using AFS with the session tfacp1100s000 with this code:

stpapi.put.field("tfacp1100s000", "tfacp100.ifbp", catel005.bpid )
stpapi.put.field("tfacp1100s000", "tfacp100.invd", str$(catel003.fecha))
stpapi.put.field("tfacp1100s000", "tfacp100.isup", catel003.factura)
stpapi.put.field("tfacp1100s000", "tfacp100.amti", str$(catel003.pagar))
stpapi.put.field("tfacp1100s000", "fotocopi", str$(etol(tcyesno.yes)))
ret = stpapi.insert("tfacp1100s000", true, mensaje)
stpapi.end.session("tfacp1100s000")
if not ret then
return(false)
endif


It always return with 0 and in the variable mensaje it was "It's no possible".

I debugger the session and after goes the second time to field.text.yn to section before.display it returns to the caller session and it execute stpapi.end.session.

This is the AFS.log I have:

LOGGING STARTED
17-03-2005
8->get.fields
8<-get.fields0tfacp100.ninv1screen.orno1screen.pono1referencia1tfacp100.ifbp1tfacp100.ptbp1tfacp100.isup1tfacp100.isup.l1tfacp100.doty.l1tfacp100.docn.l1tfacp100.seri.l1tfacp100.bank.l1tfacp100.refr1tfacp100.invd1f.recep1tfacp100.chbk.l1tfacp100.rbkn.l1tfacp100.expd1tfacp100.ccur1tfacp100.rade1tfacp100.amti1form.rate1portes1importe.portes1tfacp100.bimp1tfacp100.cpay1ver.pgi1tfacp100.paym1status.factura1fotocopi1tfacp100.hcod.l1tfacp100.desc.l1
>tfacp1100s000 put.field:tfacp100.ifbp C1216
>tfacp1100s000 put.field:tfacp100.invd 731978
>tfacp1100s000 put.field:tfacp100.isup 28-B583-337886
>tfacp1100s000 put.field:tfacp100.amti 2730.44
>tfacp1100s000 put.field:fotocopi 1
>tfacp1100s000 insert
8->add.set+save
8<-add.set+save10
<tfacp1100s000 No se permite
>tfacp1100s000 get.mess.code
<tfacp1100s000 ttstps0108


Somebody can help me?

Thank you in advance,