About .NET API

Sage CRM exposes a .NET API (Application Programming Interface) that allows you to extend Sage CRM functionality by creating and using . NET DLLs (Dynamic Link Libraries). You can reference your DLLs from within Sage CRM and thus call methods exposed by the DLLs to perform certain actions.

The Sage CRM .NET API is an alternative to traditional ASP-based customizations in Sage CRM. The .NET API provides a type library that exposes Sage CRM objects, properties, and methods. Through the core libraries exposed by the .NET API, you can manage data access and Web Interface generation.

To use the Sage CRM .NET API, complete the following steps:

  1. Install Sage CRM .NET SDK (Software Development Kit).
    For more information, see Installing Sage CRM .NET SDK.
  2. Use the Visual Studio templates, code samples, snippets, and documentation supplied with the Sage CRM .NET SDK to create your custom .NET DLL (Dynamic Link Library) for Sage CRM. For more information, see:
  3. Deploy your custom .NET DLL in Sage CRM as required.
    For more information, see Deploying custom .NET DLLs in Sage CRM.

To create DLLs for Sage CRM, you can use Microsoft Visual Studio or any other tool supporting Microsoft .NET Framework 2.0.

We recommend that you install the Sage CRM .NET SDK (Software Development Kit) for your version of Sage CRM. For instructions, see Installing Sage CRM .NET SDK.

Please consider the following before you start using the Sage CRM .NET API:

  • References to Sage CRM .NET API from within ASP.NET are not supported. For this reason, you cannot create ASP.NET pages and call them from within Sage CRM.
  • Supported programming languages. With Sage CRM .NET API, you can use any programming language that conforms to Microsoft .NET Framework 2.0, including C#, J#, and VB.NET.
  • Any assemblies created for pre-7.2 versions of Sage CRM are not supported in Sage CRM 7.2 and later.
  • You can transfer your customizations to other Sage CRM instances. For this purpose, you can use the Component Manager. For more information, see Transferring customizations to another Sage CRM instance.
  • Support for connection pooling. You can use the DotNetConnectionPool system parameter to control connection pooling. This parameter can take one of the following values:
    • N (default). Releases the connection when the object is destroyed. The number of connections changes in accordance with thread execution.
      PDATE custom_sysparams
      SET parm_value = 'N'
      WHERE parm_name = 'DotNetConnectionPool'
    • Y. Sage CRM uses OLEDB to open database connections, and OLEDB has its own database pool implementation.
      UPDATE custom_sysparams
      SET parm_value = 'Y'
      WHERE parm_name = 'DotNetConnectionPool
  • After setting a system parameter, you need to refresh system parameter metadata: go to <My Profile> | Administration | System, and then click Refresh Metadata.