LittleJohn
24th January 2005, 19:56
Hi,

This is in Baan Vc.
I have 2 lines on my sales order.. Pos 10 and Pos 20.
I'm trying to update the Planned Rec. Date on the sales order line (tdsls401.prdt) using the below AFS.
I try to update the date on Position 10... the FS works fine.
I try to update the date on Position 20.. the FS is updating the date on Position 10.

I have already reselected the query for the new postion. Just before I update.. I do a "get".. It shows position 20... selected field value of tdsls401.pono shows Position 20.. yet it updates position 10 only.

If I start my update session with postion 20... It updates 20 correctly for the first time... but then if i try to update postion 10.. it updates position 20 only.

FS is retaining my first updated record in the buffer... is there a way to clear the buffer ? i used "free$" as well... doesnt seem to help..
All help is appreciated... Thanks



tdsls4501m000f.end()
tdsls4501m000f.synchronize.dialog("add", err.msg)

tdsls4501m000f.put.Sales_Order(orno.f)
tdsls4501m000f.put.Position_Number(pono.f)
tdsls4501m000f.put.Sequence_Number(seqn)

if tdsls4501m000f.find() = 1 then

temp.orno = tdsls4501m000f.get.Sales_Order()
temp.pono = tdsls4501m000f.get.Position_Number()
temp.sqnb = tdsls4501m000f.get.Sequence_Number()

tdsls4501m000f.handle.sub.process("tdsls4101s000", "add")
tdsls4101s000f.put.Sales_Order(orno.f)
tdsls4101s000f.put.Position_Number(pono.f)
tdsls4101s000f.put.Sequence_Number(hold.sqnb)
temp.orno = tdsls4101s000f.get.Sales_Order()
temp.pono = tdsls4101s000f.get.Position_Number()
temp.sqnb = tdsls4101s000f.get.Sequence_Number()

tdsls4101s000f.put.Planned_Receipt_Date(hold.date)
tdsls4101s000f.update(1, err.msg)
tdsls4101s000f.save(err.msg)
tdsls4101s000f.end()
free$ = ""
endif
tdsls4101s000f.end()
tdsls4501m000f.end()
tdsls4501m000f.clear()
free$ = ""



Cheers
LittleJohn

mark_h
24th January 2005, 22:21
One other post has this session (http://www.baanboard.com/baanboard/showthread.php?t=22694&highlight=tdsls4501m000) in it. I notice that you have:


tdsls4501m000f.handle.sub.process("tdsls4101s000", "add")
tdsls4101s000f.put.Sales_Order(orno.f)


In baan 4 you need something to activate the sub-session - continue, update, etc. Based on the link above I wonder if you need something like the stpapi.forms.command Doug mentioned. Maybe that is why when you update the lines it is not finding the correct position.

Of course I know nothing about Baan V so feel free to chuckle at me until somebody comes along and posts something more useful. :)

Mark

LittleJohn
24th January 2005, 23:25
Hi Mark,

Thnks for the reply.
I guess, a "Find" is never activated in the maintain subsession in Baan V.
Just before assigning the new date value... I tried putting a tdsls4101s000f.find() = 1 condition there.. and it seems to work so far :) ... Well.... am not complaining :)

Thnks for your time