Greetings to all,
I’m new to cuba so i think that this question is simple for you. I searched the docs and the forum but I have not managed to find a solution yet.
I have an order entity, which has a “number” field (integer).
I created the browse and edit screens for this entity. All work fine.
Now i need to set the value for the field “number” in the edit screen, when the user opens the edit screen.
The value must be the last inserted value + 1.
I managed to override the postInit() function of the edit screen, I can ste a fixed value in the correct field, but i can’t find a way to query the db to get the maximum (or last) inserted number or to pass it from the browse view (that since it has all the records would be easy for me to pick the right one)
How can i solve this little issue?
Is it possible for you to explain me both this techniques?
Thank you in advance