kanikahada
25th January 2013, 12:13
this simple afs to maintain lot doesnt give any error and doesnt insert lot,mannually there is no problem,any suggestion are welcome

stpapi.synchronize.dialog("whltc1100m000", "modify", error.msg)
stpapi.put.field("whltc1100m000", "whltc100.ite
stpapi.put.field("whltc1100m000", "whltc100.clot", str$(set.lot))
stpapi.put.field("whltc1100m000", "whltc100.olot","1")
stpapi.put.field("whltc1100m000", "whltc100.bfbp", str$(supp))
stpapi.find("whltc1100m000",error.msg)
ret1 = stpapi.insert("whltc1100m000", true, error.msg)

mark_h
25th January 2013, 15:13
First this is the wrong forum - You should use the AFS forum. Second try searching the AFS forum for the session in question. I found this thread where working code is included - whltc1100m000 (http://www.baanboard.com/baanboard/showthread.php?t=54140&highlight=whltc1100m000). The first thing I noticed in your code was you do a find before the insert. The find will always find a record of some sort, which would over write your input fields and the insert would still work - just not do anything.

kanikahada
28th January 2013, 05:16
THANKS A LOT FOR YOUR HELP,i am newly joined to the .com so not knowing the correct thread.thanks again