Labels

Tuesday, July 12, 2011

Subform detail or summary view

Often there is so many fields on a subform, that user become confused. It's a standard Navision way, that user can customize those fields, that he wants to view on the subform. But, I think, more user-friendly is to have a button, that switches from summary view to details if user wants to enter extra-data.
Lets take for example Sales Order. I've created 2 buttons, place them on each other below the subform: bSum & bDetails.
bSum is not Visible by default (property Visible = No), it means the Summary view will be shown by default and user can switch to Details.



I added special trigger ShowFields on 46 Sales Order Subform:

It's only remains to write some code in buttons OnPush triggers:



Note that when you open this form for a first time you will see detail view and details button. If you want to switch to summary then you must push the button twice (to details and back to summary). After that a fields to show will be saved and loaded each time you open this form.

No comments: