how determine the current mode: view or edit?
I'm creating a page to handle (override the default) adding/editing/viewing of custom object records.
I know I can create 2 or 3 pages to handle all the modes mentioned, but it would be handy to maintain just one page, since they would have the same layout and fields set. So it would be like have a page "Page1" to override "New", "Edit" and "View" of a custom object.
Now, how do would I determine if a record opened is in New/Edit or View mode?
Is there something like ApexPage.currentPage().isEditMode() that I could use?
Spent hours (a day actually) searching for this but didn't find an answer.
Thanks in advance.