baan2tm0
29th March 2006, 17:04
when I use stpapi.enum.answer in VB.NET it doesnot seem to work for me. Here's how I use it:

stpapi.enum.answer("tihra1101m000","tihras0029",2)


where:
Session="tihra1101m000"
Question ="tihras0029"
Answer=2(tcyesno.tcno)

This is supposed to be used in the Hours Accounting Module, when we set the Man Tm field to some other value and save the record, a question/session (tihras0029) will popup and ask "Update man hours till calculated value?". I am trying to set the answer to this question to No but it does not work.

mark_h
29th March 2006, 20:59
Are you making sure you are setting the answer before the question is asked? Post your code and someone might see the problem.

Also something that I have done in the past may work for you. Just change the default answer. That may or may not work depending on what the program does.

Paul P
31st March 2006, 04:35
Hi, baan2tm,
The correct syntax for stpapi.enum.answer() is
void stpapi.enum.answer(string session, string question,bset answer)
So, in your case, it should be
stpapi.enum.answer("tihra1101m000","tihras0029",tcyesno.no)
Rgds,
Paul