Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 17th June 2013, 07:33
nolihayati isma nolihayati isma is offline
Member
 
Join Date: May 2013
Posts: 63
nolihayati isma is on a distinguished road
Baan: Baan IV - DB: Oracle10g - OS: Unix
To save record via tab cursor
Baan: Baan IVc4
C/S: Both

Hi All

field.tsrep124.plan is last input field. So in after.field, i execute(update.db) or execute(start.set).Both executes save the record but the cursor moved to seq no 2 which already in table.
Cursor should move to new record and ready for new record.

1) field.tsrep124.plan:
after.input:
execute(update.db) or execute(start.set)
=> record save but cursor moved to seq 2.

2) Also try to use execute(add.set), but error recursion not implemented pop up.

If I added to.field after the update.db, cursor will moved to tsrep124.prin but at 1st seqn record.

field.tsrep124.plan:
after.input:
execute(update.db)
to.field("tsrep124.prin")

current record save but cursor moved to field prin at 1st seqn record

I need cursor moved to next seqn and save previous record.

Please assist me.

i attached the code in attachment.
Attached Files
File Type: txt Code.txt (17.9 KB, 56 views)

Last edited by nolihayati isma : 17th June 2013 at 07:42.
Reply With Quote
  #2  
Old 18th June 2013, 10:30
bartman bartman is offline
Junior Member
 
Join Date: Oct 2006
Location: Germany
Posts: 16
bartman is on a distinguished road
Baan: LN 6.1 FP3 - DB: Oracle 10g - OS: Solaris 10
Hi,
as I understand your problem, you will force your session to save data on every change in occurrence.

Following code might be right for you:

after.form.read:
enable.save.on.occ.change()

Regards
Reply With Quote
  #3  
Old 18th June 2013, 11:23
nolihayati isma nolihayati isma is offline
Member
 
Join Date: May 2013
Posts: 63
nolihayati isma is on a distinguished road
Baan: Baan IV - DB: Oracle10g - OS: Unix
Hi,

Thank you for your feedback but there still no luck of me.
may be this suggestion option not available in Baan IV. I having compilation error.

The error is:
Unresolved reference to function 'enable.save.on.occ.change'
Reply With Quote
Sponsored Links
  #4  
Old 18th June 2013, 11:58
nolihayati isma nolihayati isma is offline
Member
 
Join Date: May 2013
Posts: 63
nolihayati isma is on a distinguished road
Baan: Baan IV - DB: Oracle10g - OS: Unix
Hi,

Thank you for your feedback but there still no luck of me.
may be this suggestion option not available in Baan IV. I having compilation error.

The error is:
Unresolved reference to function 'enable.save.on.occ.change'
Reply With Quote
  #5  
Old 18th June 2013, 16:09
nolihayati isma nolihayati isma is offline
Member
 
Join Date: May 2013
Posts: 63
nolihayati isma is on a distinguished road
Baan: Baan IV - DB: Oracle10g - OS: Unix
Hi,

problem resolved by myself by using db.insert and refresh.cur.occ in the after field.

The issue rectified as per code below:
Code:
field.tsrep124.plan:   | This is last input field 
after.input:
if tsrep124.plan = tcyesno.yes then
	refresh.curr.occ()      
	tracking()   
	db.insert(ttsrep124)
	commit.transaction()
endif
Special thanks to Bhushan Chanda & Bartman for your help and give me the idea to resolved it.

Last edited by mark_h : 18th June 2013 at 16:41. Reason: add code tags.
Reply With Quote
  #6  
Old 18th June 2013, 16:41
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Thanks for posting the solution. What does the tracking routine do?

The reason I ask is because I have a situation where moving between forms is not to clean. Even the baan standard sessions don't work the way they want me to code it - so anything might give me something else to try.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #7  
Old 18th June 2013, 18:09
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Well done!

Glad to see this. Finally you managed to solve it!
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #8  
Old 19th June 2013, 05:40
nolihayati isma nolihayati isma is offline
Member
 
Join Date: May 2013
Posts: 63
nolihayati isma is on a distinguished road
Baan: Baan IV - DB: Oracle10g - OS: Unix
Hi Bhushan,
Thank you to you too.

Hi Mark,
The requirement is to block duplicate serial number during data entry. The problem is this serial no not defined as index.

What i do is, i create function to check the existing serial number entered.
and the last of input field, i code as above code.

Before i added refresh.curr.occ(), when the cursor move into the last field(in current seqn), I get message "record already exist (Ok/help) and when i clicked ok, cursor moved to next seqn ready for new data entry but prev seqn which just entered, not display. I just get to see the prev seqn by click edit, fresh.

Bartman advise me to add after.form.read: enable.save.on.occ.change() but this not available in Baan IV c4. and found this refresh.curr.occ in google.

With this stamement, the message disappear, record displayed and new entry not able to enter the same duplicate serial number.

Waiting customer to test hope not other impact to other module since this screen having a lot of 6 subsession/link.

Thank you to all.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Question mr_suleyman Tools Development 37 11th November 2016 09:14
Save record in form type 3. nolihayati isma Blogs and Web links 2 17th June 2013 06:39
How to capture save button for inserting record? baansavvy Tools Development 4 16th July 2010 21:34
How to create and save a record automatically kevinwangsct Tools Development 3 19th May 2010 07:51


All times are GMT +2. The time now is 22:46.


©2001-2017 - Baanboard.com - Baanforums.com