PHPTeufel
29th June 2007, 07:51
Does anybody have experience with the recording of project-times via AFS?
The main-problem is, I think the date-format.
For tips, I would be very grateful.
mark_h
29th June 2007, 14:22
I think if you search for tihra1101m000 in this forum you will find some threads that help.
PHPTeufel
2nd July 2007, 10:15
Hi,
Ok, I'm one step further.
But now I get after the stpapi.insert() "Tag nicht zulässig" (Day not allowed).
Here the code.
stpapi.put.field("tihra1101m000","tihra100.year","2007")
stpapi.put.field("tihra1101m000","tihra100.week","18")
stpapi.put.field"tihra1101m000","tihra100.emno","999100")
code=stpapi.change.view("tihra1101m000",errstr)
if code<>1 then
stpapi.put.field("tihra1101m000","tihra100.year","2007")
stpapi.put.field("tihra1101m000","tihra100.week","18")
stpapi.put.field("tihra1101m000","tihra100.emno","999100")
end
stpapi.put.field("tihra1101m000","tihra100.dayn","2")
stpapi.put.field("tihra1101m000","tihra100.cprj","923502")
stpapi.put.field("tihra1101m000","tihra100.cact","INS")
stpapi.put.field("tihra1101m000","tihra100.koht","1")
stpapi.put.field("tihra1101m000","tihra100.hrea","75,5")
code=stpapi.insert("tihra1101m000",errstr)
if code<>1 then
code=stpapi.recover("tihra1101m000",errstr)
end
mark_h
2nd July 2007, 14:05
This is the best I can do - see this thread (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=5800&highlight=tihra1101) - specifically the post by NvanBeest. He posted a copy of his code that works. Notice that he does a update with mode 0, followed later by save.