We want to initialize some fields in newly added records, BUT:

1- if I put code in actNewRecord button(api_datasource.setColumnValue....), the record status became api_datasource.ROW_STATUS_NEW, the datasource isDirty, and the record will be saved when the user press Save button, which I dont want to happen. Is there a way to set the status of record in api_datasource.ROW_STATUS_TEMP after these initializations?

2- If I check Force Current Row in Datasource, a new record is created, but no field initialization can be done. Or we can, in this case, HOW, please?

3- If I dont check Force Current Row in Datasource, I can force initialization, but we return to case 1-, plus... if the user want to delete the last and only row in the datasource he cannot save because doCommit rises api_exception.e_noCurrentRow exception.

Any sugestions will be apreciated!



asked 06 Jul '16, 05:54

brg's gravatar image

accept rate: 0%

edited 06 Jul '16, 06:45

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 06 Jul '16, 05:54

Seen: 1,779 times

Last updated: 06 Jul '16, 06:45

© Copyright Gerger 2017