Detecting Screen Mode in the Client Side API

Sage CRM Screens can exist in different 'Modes'. The basic two modes that we have to worry about in Client Side code are View and Edit.

We can use the fact that in Sage CRM HTML tags are named and have an ID with same name as the physical field in the database. e.g. . And these are only written into the page when the screen is in Edit Mode. If the tag for a field exists then the page is in Edit mode and if it doesn't then it is in View mode.

In Sage CRM Client Side API has a method of checking mode.

[code language="javascript"]