How can I access Next record and Previous record function?

Hello SERVOY users,

In fact in some forms I would like to use the predefinned properties of form to go to the next or previous record, but I woud do some other things at the same time.

Is it not possible to call the method that is called automatically when we let the property to default ???

:?:

Thanks for your help.

DomTom.

huh, sorry but I really don’t understand this…

I give you more detail :

By default the onNewRecordCmd property form is DEFAULT and I can change like this : newRecord

method newRecord :

// create new record
controller.newRecord(true)
elements.cnt_dt_namefirst.requestFocus(false)

By default the onNextRecordCmd property form is DEFAULT and I would like change to nextRecord

But how can I in my proper method go to the next record and do my additionnal proper check

I would like create my method
method nextRecord
//next record and hide non useful elements
controller.NEXTRECORD ???
(Is there a function to go to the next record ???)
My proper code to do other thing

I hope it’s more clear now ?

Thanks for your help.

DomTom

(P.S. : The Wordplugins is working very well)

Hello Dominique,

You can do

controller.setSelectedIndex(controller.getSelectedIndex() - 1); // previous record
controller.setSelectedIndex(controller.getSelectedIndex() + 1); // next record

I think that’s about it currently…

(P.S. : The Wordplugins is working very well)

thanks, nice to know :)