SriksAdi
24th August 2004, 14:46
Hi,
I have a session to create a Credit Note using AFS.
Initially we were on IVc4 SP 14 and it worked well, my session stopped working on installing SP 15 Tools.

I could successfully create a Batch and when I try to insert into tfacr1110s000 (Maitain Sales Invoices), I get an error Customer Name not allowed.

I could notice that the value of tfacr200.cuno was set properly.


Create batch and start tfacr1110s000....
stpapi.handle.subproc("tfgld1101m000", "tfacr1110s000", "add")
stpapi.continue.process("tfgld1101m000", error)
stpapi.put.field("tfacr1110s000", "tfacr200.cuno", tdsls045.cuno)
stpapi.put.field("tfacr1110s000", "tfacr200.ttyp", tdpfl213.ttyp)
stpapi.get.field("tfacr1110s000", "tfacr200.cuno", value)
stpapi.put.field("tfacr1110s000", "screen.amnt", str$(cn.amnt))
stpapi.get.field("tfacr1110s000", "screen.amnt", value)
value = "Cash Discount for :" & str$(tdsls045.orno)
stpapi.put.field("tfacr1110s000", "tfacr200.refr", value)
stpapi.handle.subproc("tfacr1110s000", "tfacr1111s000", "add")
ret = stpapi.insert("tfacr1110s000", 1, error )

if ret = 0 then
stpapi.end.session("tfacr1110s000")
message(error)
return
endif

regards
Sriks

mark_h
24th August 2004, 15:45
Try doing a stpapi.save on tfacp1110s000 right after the continue statement on tfgld1101m000. I do know that we just installed the latest tools stuff in one of our test companies and this seems to help in some cases.

Mark

SriksAdi
24th August 2004, 15:53
Hi Mark,
I have done it and still no help.
I guess we have this problem when ever we upgrade on the tools part. I went through a few posts and many cases, problem started after tools update.


regards
sriks

mark_h
24th August 2004, 17:13
We try to check these with every tools release we get, seems like something new with every release. You may also want to ask baan for the latest stpapi libraries/patch, this may fix the problem. I know this should come with the patch, but sometimes even Baan makes a mistake.

Mark

SriksAdi
26th August 2004, 18:17
Hi,
I have installed a few patches from Baan and it worked.

Thanks
Regards
Sriks