mathew
18th July 2018, 09:55
Hi Friends,
In maintain session before moving to next row when i try to save the current record changes, it was updating only the first row exactly what i need, after that it won't updating the changes in table.
Can you please help me.
Please find the below code
select tdsls999.*
from tdsls999
where tdsls999.item = :tdsls999.item
selectdo
tdsls999.stan = 101
zzsls901.slot = zzyesno.yes
update.occ()
execute(update.db)
endselect
mathew
20th July 2018, 07:56
Hi Friends,
please reply how to do the above logic in multi occurrence session before moving to next row the current row have to get save if i changing status as Yes or not
becks2203
20th July 2018, 10:04
USE enable.save.on.occ.change() in after.form.read.section()
mathew
20th July 2018, 11:29
Hi friend
Thanks for the reply. I used it in after.form but it was showing unresolved reference function error. I am using baan 4 c4 version . Can you please given me in detail.
After.form.read.section means after exit the form it reacts right.
I am asking in the current form itself having multiple rows with main table. When i do tab in last field and changing status as Yes then before moving to next row it has to save and update the data.
Regards,
mathew
mark_h
20th July 2018, 15:33
Okay - it what event did you put this action? And you are trying to force an update before moving to the next row? I am going to see if we do something like this with our qkey sessions.
mark_h
20th July 2018, 15:42
For something like a single occurrence it looks like in most cases we just wait for the user to hit the save button. So this is qkey - so it calls the baan event first then executes our code. Our code does not have a retry point and just works with in the baan transaction that is on. Let me see if I can find something on a multi-occurrence session.
main.table.io:
after.write:
if tdinv100.kowt = tckowt.stc.correction then
update.tdudi100()
endif
after.rewrite:
|#call
if tdinv100.kowt = tckowt.stc.correction then
update.tdudi100()
endif
before.delete:
if tdinv100.kowt = tckowt.stc.correction then
delete.tdudi100()
endif