heartbeat
27th July 2016, 14:08
stpapi.put.field("tccom4130s000","tccom130.cadr","11111")
stpapi.put.field("tccom4130s000","tccom130.nama","11111")
stpapi.put.field("tccom4130s000","tccom130.ccty","THA")
stpapi.put.field("tccom4130s000","tccom130.pstc","10100")
stpapi.put.field("tccom4130s000","tccom130.cste","T10")
stpapi.put.field("tccom4130s000","tccom130.ccit","T0813")
stpapi.put.field("tccom4130s000","tccom130.tzid","THA")
result = stpapi.insert("tccom4130s000",true,error.msg)

if result = 1 then
message("Completed")
else
message("Fail.")
endif

stpapi.end.session("tccom4130s000")


System giving message on insert records by manual ("Address has the same contry, address, house number, p.o. box number and zip code. save anyway?")

My AFS is show "completed" message. but it is not save data.

andreas.toepper
27th July 2016, 14:52
You could try Setting a default answer for the question:
stpapi.enum.answer("tccom4130s000", "tccom4130.1", tcyesno.yes)

SYNTAX void stpapi.enum.answer(string session, string question,
bset answer)

ARGUMENTS
session: Name of the session this command is executed on.
question: Baan ERP question code. This question code must be valid
within the session, that is, the session must ask this question
when the user interface is used.
answer: The enum or set answer to be supplied as answer to the
question. This must be expressed as the enum value as
opposed to the numeric equivalent for example, tcyesno.yes
i.s.o. 1.

heartbeat
28th July 2016, 05:18
Thank you very much.