How to check Navision page open Which mode like View,Edit And New.

I have created one add-in and use in page , My problem is it’s also editable in view mode. Please suggest me.

How can I stop editable mode of my add-in in view mode

What kind of are you talking about (see the PageType property of the page)?

Hello Luc,

Thanks for the replay.

I have created one add-ins (color picker) and successfully implemented in page, but my problem is color getting add-ins
editable in view mode. My requirement is it’s only editable in edit and new mode time not view mode time (Navision Default Behavior)

Hi Kirit,

Can you show the Images of what you want.

I think that will be clear in solving your problem.



Hi Kirit,

Could you please answer Luc’s question. What page type are you using?


I am using card page type .

I have attach one image with marking. Please see.

Currently my page type mode is view but my add-ins button is also work same as edit and new mode

Please suggest me, how can I handle my button in view mode.
Color Picker.png

Hai Kirit,

Not being a Add-ins specialist I asked a fellow developer and he answered (hope it will help you):

WinFormsControlAddInBase (and the derived StringControlAddInBase) has a protected property Site (of type IControlAddInSite), which the control can use to retrieve information about the page it lives on. IControlAddInSite has an Editable property, that the add-in can check to see if it should be editable, i.e. whether or not the page is in an editable mode (New/Edit vs. View).

In order to get notified about changes in the Site’s editability, WinFormsControlAddInBase defines a protected OnEditableChanged Method, so that the control can update it’s appearance and behaviour as appropriate.

Thanks Luc, Currently I am using StringControlAddInBase So I will try WinFormsControlAddInBase and check it