MS CRM Plug-ins development for offline solutions:
Plug-in- A “MS CRM plug-in” is a custom code which is intended to be executed when specific actions (events) happen on a certain Microsoft CRM entity.
Things to consider for plug-ins development offline:
1.The plug-in should be deployed to the database instead of the file system so that Microsoft Dynamics CRM automatically registers the plug-in on the client’s computer the next time the client goes offline.
2.We need to add the public token key guid of the plug-in assembly as a new key under the “AllowList key” registry key.
3. For a plug in to work or to be tested in offline mode we need to have Microsoft Dynamics CRM for Outlook with Offline Access installed and configured.
4.We need to add logic to determine when the client computer is in offline mode because the plug in will run twice both in offline and online mode. So we need to prevent this. For this we can check for”CallerOrigin” property of IPluginExecutionContext .