frenny
29th December 2014, 10:52
Hello
How to handle Field level Form Command in AFS?
I m unable to handle it with stpapi.form.command()
Thank you
soumya093
29th December 2014, 14:43
As your profile says you are using BAAN IV so ...
Try using stpapi.continue.process(string session, ref string
err.mesg) or stpapi.handle.subproc(string session, string sub.prog,
string action)
frenny
30th December 2014, 06:06
hello,
I m using ERPLN
and I also tried both but its not working
soumya093
30th December 2014, 09:25
What are the arguments you are passing in stpapi.form.command()??
frenny
30th December 2014, 10:10
This is my AFS..
stpapi.put.field("ltrpd2101m000", "ltrpd201.cprj", i.cprj)
ret = stpapi.change.view("ltrpd2101m000", err)
stpapi.enum.answer("ltrpd2101m000", "ltanystr", tcyesno.no)
stpapi.form.command("ltrpd2101m000", 5, "fetch.data", err)
if isspace(err) then
stpapi.end.session("ltrpd2101m000")
return(true)
endif
stpapi.end.session("ltrpd2101m000")
return(false)
here field level fetch.data button is there ...
jayugandhi
30th December 2014, 12:57
Hi Frenny,
check this things-
1. check in bshell first, ltrpd2101m000 is your session opened properly?
2. check question code.
stpapi.enum.answer("ltrpd2101m000", "ltanystr", tcyesno.no)
I am doubtful in the question code that you are using.
mark_h
31st December 2014, 18:44
The form command is correct for ln. As mentioned make sure you have the correct question code. Also make sure the change view returns what is expected. Is there any error message in the form command?
frenny
2nd January 2015, 05:19
Hello,
I have Add Form Command at form level then this afs is working but only field level ,its not working
bhushanchanda
2nd January 2015, 18:40
Hi,
Not sure about this session, but what you can try is, answer the question before everything.
stpapi.enum.answer("ltrpd2101m000", "ltanystr", tcyesno.no)
stpapi.put.field("ltrpd2101m000", "ltrpd201.cprj", i.cprj)
ret = stpapi.change.view("ltrpd2101m000", err)
stpapi.form.command("ltrpd2101m000", 5, "fetch.data", err)
if isspace(err) then
stpapi.end.session("ltrpd2101m000")
return(true)
endif
stpapi.end.session("ltrpd2101m000")
return(false)