jp.aalders
18th July 2008, 16:42
Hi Guru's

I'm developping an AFS session on tihra1101m000. However I am able to insert records into the tihra1101m000 is still have a problem with inserting the records in te correct week.

First action on starting the AFS functionalliy is to set the view and to select the correct year/week/employee. Unfortunately AFS points the view always to the current week instead of the week I select.

F.I., I want to book hours using AFS in week 17/2008 for employee 999001, the AFS return values do not return errors but when I check the select values using stpapi.get.field it has selected the wrong week.

Any Ideas what the problem can be? My code is attached,

JP :confused:

mark_h
18th July 2008, 20:16
Never done one on this session - have you seen this thread here (http://www.baanboard.com/baanboard/showthread.php?t=5800). I know there have been posts about how to get the session to work - I also seem to recall one about changing the startup option on the session.

jp.aalders
18th July 2008, 20:32
Hi Mark,

Thanks for your quick reply. My script is based on the one Nico posted, as you can see it is pretty much the same. Any options?

John

mark_h
18th July 2008, 21:19
Have you tried that BOI variable mentioned in the thread?

Have you tried a stpapi.save as soon as you start the session? I had a problem where I started a session and it went it to input. Nothing I did would work - until I put a save first. Then I could do a find on my record. Just a thought?

Do you have source code? Or anything were you might be able to view the code in debug mode to find out what is happening?

jp.aalders
18th July 2008, 21:55
Hi Mark,

Thanks for your info. I'll try and let you know. Have a nice weekend.

John

jp.aalders
21st July 2008, 12:34
Hi Mark,

I've got the session tihra1101m000 working using AFS. The problem was related to the hra parameters, the field tihra000.koha value was set to day.by.order in stead of week.by.order. Due to this the session tihra1101m000starts in that case with the view weekday/week/year and employee instead of week/year and employee number.

Therefore AFS is not able to set the correct week and starts with the current week instead of the week set by the AFS script.

So, the settings of the tihra parameters is important to get the session working correctly if using an AFS entry by week and year.

Thanks for your help,

John