v7.1 Developer Guide
Copyright 2011 Sage Technologies Limited, publisher of this work. All rights reserved.No part of this documentation may be copied, photocopied, reproduced, translated, microfilmed, or otherwise duplicated onany medium without prior written consent of Sage Technologies Limited.Use of the software programs described herein and this documentation is subject to the End User Licence Agreementenclosed in the software package, or accepted during system sign-up.Sage, and the Sage logo are registered trademarks or trademarks of The Sage Group PLC. All other marks are trademarks orregistered trademarks of their respective owners.
ContentsStep 1: Create a Custom Help Page4-3Step 2: Add a Help Button to your Custom Page4-3Limitations4-3Lists4-3How to Create a List4-3How to Display a List4-4Display a List Using an ASP Page4-4Display a List using Runblock and the List Name4-5Screens4-5How to Create a Screen4-5How to Display a Screen4-6Display a Screen Using Runblock and Screen Name4-7Display a screen using Runblock with a Custom Block4-7Display a screen with an ASP page4-7Buttons4-8Creating Button Groups4-8Adding Buttons to Button Groups4-8Viewing Button Groups4-9Restricting Access to Button Groups4-9CRM Classic DashboardCustomizing The Classic Dashboard4-94-9Adding a List Block To The Classic Dashboard4-11Adding a Content Block To The Classic Dashboard4-11Adding a Chart To The Classic Dashboard4-12CRM Interactive DashboardCustomizing the Interactive Dashboard4-134-13Example: Adding a Content Block to the Interactive Dashboard using the Contents field413Example: Adding a Content Block To The Interactive Dashboard based on an ASP page415Adding a Third-party gadget to the Interactive 4-17Contents – ii Sage CRM
Owner4-18Blocks4-18Creating a New Block4-18Customizing a Block4-19Displaying a Block4-19System Menus4-20Modifying System Menus4-20Creating a Main Menu Button4-20Creating an Admin Menu Button4-21Creating an External Link on the Main Menu4-21Tabs4-24Creating a New Tab Group4-24Editing the Main Menu Tab Group4-25Adding a Tab that Links to an ASP Page4-25Restricting Access to the Tab4-26Tab Actions4-27Chapter 5: Database Customization5-1Introduction to Database Customization5-1Creating a New Table5-1Creating a New Database Connection5-3Creating a New Table Connection5-4Example: Creating a Tab to Display a List of Invoices5-4Example: Displaying an Individual Invoice from a List5-6Example: Adding New Data Entry and Maintenance Screens5-7Table and Entity Scripts and Functions5-12Creating a Table Level Script5-14Detached Table Level Scripts5-14Creating an Entity Level Script5-14Example: UpdateRecord in an Entity Level Script5-15Example: InsertRecord5-16Developer Guide Contents – iii
ContentsExample: PostInsertRecord5-16Example: UpdateRecord5-16Example: DeleteRecord5-17Advanced Customization Wizard5-17Creating a New Main Entity5-17Advanced Customization Wizard Parameters5-18Enabling Company and Person Deduplication5-21Custom Files and Metadata5-22Making Custom Entities Available for Reassignment5-24Customizing a New Main Entity5-25Advanced Customization Wizard Example5-26Chapter 6: Component ManagerIntroduction to Component What Types of Customizations can be Recorded?6-1Recording Customizations6-2The Component Details Screen6-2Starting Component Manager6-3Stopping Component Manager6-3Adding Customizations to an Existing Component6-3Changing the Current Component6-4Scripting Customizations6-4Previewing Changes6-4Scripting Changes6-4Scripting Multi-Stage Customizations6-5Scripting Workflows6-6Saving a Component6-7Installing a Component6-7Component Manager Log File6-8Advanced Component Options6-9How to Generate a Component Script using Advanced Component OptionsContents – iv Sage CRM6-9
ContentsHow to Create a New Component Using Advanced Component OptionsModifying Component Manager Scripts6-106-11Error Handling6-12Referential Integrity6-12Script Parameters6-13Phone and E-mail Changes6-14Component Manager Methods6-14Component Manager Scripting Examples6-36Chapter 7: Graphics and Charts7-1Introduction7-1Charts Overview7-1Fusions Charts System Parameters7-2Pie Chart Only Effects7-2Special Effects For Charts7-3Using External Data for Charts7-3Chart Examples7-4Example: Adding a New Chart7-4Example: Organization Chart7-6Graphics Overview7-8Graphics Formats7-8Graphics Performance Tips7-9External Images7-10Graphics Examples7-10Example: Adding a New Graphic7-10Example: Pipeline7-11Graphic Effects Basics7-14Change Image Color7-14Clear An Image7-14Display Errors7-14Drawing Functions7-14Merging7-16Special Effects7-17Animation7-17Developer Guide Contents – v
ContentsAdding Frames7-17Delay7-17Loops7-17ASP Example7-18Chapter 8: ASP Object Reference8-1Introduction to the ASP Object Reference8-2Quick Reference Table8-3Examples8-7Sample CRMGridColBlock ASP page8-7Sample CRMListBlock ASP page8-7Using the New Workflow Properties in an ASP page8-8AddressList ObjectMethodsPropertiesAttachment hmentList Object8-11Properties8-11Email Object8-12Methods8-12Properties8-13MailAddress ObjectPropertiesMsgHandler Object8-158-158-15Methods8-16Properties8-16CRM Object8-17Methods8-17Properties8-22CRMBase Object8-22Methods8-23Properties8-27Contents – vi Sage CRM
ContentsCRMBlock Block ck Object8-36Methods8-37Properties8-39CRMContentBlock ObjectPropertiesCRMEntryBlock yGroupBlock Object8-55Methods8-56Properties8-57CRMFileBlock ObjectPropertiesCRMGraphicBlock ColBlock ObjectPropertiesCRMListBlock ueeBlock ObjectPropertiesCRMMessageBlock ObjectPropertiesCRMOrgGraphicBlock ObjectMethods8-778-778-798-808-828-82Developer Guide Contents – vii
ContentsCRMPipelineGraphicBlock Object8-82Methods8-83Properties8-85CRMQuery Object8-85Methods8-86Properties8-87CRMRecord Object8-89Methods8-89Properties8-92CRMSelfService Object8-95Self Service Method and Property Differences8-95Note on Instantiating the CRMSelfService eld ObjectPropertiesCRMTargetLists le: Creating and Saving a Target List8-102Example: Retrieving a Target List8-103CRMTargetListFields Object8-103Methods8-104Properties8-104Chapter 9: Web Services9-1Introduction to Web Services9-1Setting Up CRM Web Services9-2Objects and Functions Overview9-5List of Web Services Functions9-5List of Web Services Objects9-7The CRM RecordType Object9-10Selection Fields in Web Services9-11Introduction to Web Services Examples9-13Contents – viii Sage CRM
ContentsSample SOAP Requests9-15Chapter 10: SData Read-only10-1Introduction to SData10-1Overview of SData within Sage CRM10-1SData Prerequisites10-2Switching on SData10-2Constructing SData URLs10-3SData URL Examples10-3SData Authentication10-3Chapter 11: .NET11-1Extending Sage CRM With .NET11-1Sage CRM .NET API and ASP.NET11-2Programming Languages11-2Component Manager11-2Connection Pool11-2Using .NET Application Extensions11-2The CustomDotNet Folder11-2Changing the Build Location of the DLL11-2Copying the DLL file to the CustomDotNet Folder11-3Calling the .NET Application Extension11-3Calling the .NET Application Extension From Tabs/Menus11-3Calling the .NET Application Extension From List Block Hyperlinks11-4Calling the .NET Application Extension From Within Another Custom .NET ApplicationCalling the .NET Application Extension From ASP Pages.NET API Debugging11411-411-4Method 1: Change IIS Security11-5Method 2: Use COM 11-5Troubleshooting11-6.NET API Class Library Documentation11-6Sage Namespace11-6Sage.CRM.WebObject Namespace11-7Sage.CRM.Controls Namespace11-7Developer Guide Contents – ix
ContentsSage.CRM.Data Namespace11-7Sage.CRM.Utils Namespace11-7Sage.CRM.Blocks Namespace11-8Sage.CRM.HTML Namespace11-8Sage.CRM.UI Namespace11-8Installing the .NET SDK11-8Pre-Installation Checklist11-8Installing the SDK and .NET Templates11-9Installation TroubleshootingManually registering the DLLManual Installation of the CRM Visual Studio .NET Templates11-911-911-10Uninstalling the .NET SDK11-10.NET Examples11-10Creating a Simple Sage CRM Interface11-11Creating a More Complex CRM Interface11-12Creating a Project Based on a Sage CRM Template11-16CRM Basic Template11-16CRM Entity Template11-17IndexContents – x Sage CRMi
Chapter 1: IntroductionThis Developer Guide is for CRM Implementers and Programmers. We assume that you are aconfident CRM user and are fully conversant with the topics covered in the System AdministratorGuide.We also assume that you are fully conversant in the areas of:lSQL views, tables, databases, data relationships, and normalization.lProgramming concepts.l Internet technologies, specifically Active Server Pages (ASPs).Sage CRM is extensible using the Extensibility Module (EM). EM technology is also known as CRMBlocks. As well as the ability to extend your own system, EM enables you to create custom pageswhich you can add to other CRM systems using the Component Manager feature—enabling you toextend your customers’ CRM systems.The focus of this guide is on extending your Sage CRM system using CRM Blocks, ASP pages andthe .NET SDK. The Sage CRM system can also be extended using Web Services (page 9-1).Please note that while this guide refers to Sage CRM, CRM, or the CRM system throughout, regionalproducts may use different brand names.Also note that CRM Blocks used to be known as eWare Blocks. Existing code that refers to eWareBlocks or the eWare object will still work, and CRM and eWare are interchangeable (except in thecontext of CRMSelfService). Please see the ASP Object Reference for more information.Developer Guide 1-1
Chapter 2: OverviewIn this chapter you will learn how to:lGet an overview of the Web Architecture.lGet an overview of the Extensibility Architecture.lGet an overview of the .NET Architecture.lCompare .NET and ASP as customization methods.lDiscuss Security in Sage CRM.lGet an overview of customization options.lDiscuss database properties.Web ArchitectureCRM is based on a standard Web applications structure. The application server sits into an existingintranet environment.Web Browser. A standard browser such as Internet Explorer. As CRM is a thin-client configuration,a browser is all that is required on each user's computer.Firewall (optional). You may have a firewall installed between your network and the Internet fornetwork security. This is not a required component for CRM.Web Server. The CRM Application Server works with Microsoft Internet Information Server. Pleaserefer to the latest Product Support Matrix for supported versions.Web ArchitectureDeveloper Guide 2-1
Chapter 2CRM Application Server. The CRM Application Server comprises a number of subsystems, whichwork together to coordinate the delivery of information and functionality to clients. These includeobjects for checking user security, maintaining user persistence, getting information from thedatabase, generating Web pages from data, and processing business rules and logic. This guidedescribes each of these objects and outlines their properties and methods.Database. CRM has native support for Microsoft SQL Server and Oracle. The database is used tostore corporate data and metadata, which define the system customization, security, and businessrules.E-mail Server. The E-mail Management functionality enables the Application Server to be integratedwith the E-mail server to automate the sending of e-mails and SMS messages as part of the CRMimplementation. The CRMEmail object and the CRMMsgHandler object and it's child objects areused to customize the E-mail Management functionality. Note that the CRMMessageBlock objectcan also be used to send messages in SMS and e-mail format.As CRM is designed for a multi-tier environment, you can have all of the above components on thesame or separate machines.Note : IIS and the CRM DLL have to be on the same server, so as a general rule IIS andCRM are installed on the same server. We would recommend that the database isinstalled be on a dedicated database server.DLL. The CRM DLL (Dynamic Link Library) runs on a Windows Server with Microsoft InternetInformation Server (IIS) Web Server software. The IIS Web Server communicates with CRM throughthe CRM DLL and Internet Server Application Programming Interface (ISAPI) technologies.Apache Tomcat Redirector. The redirector in v7.1 is an ASP.NET Reverse Proxy, which is a 32bit/64-bit ASP.NET web application configured in standard Apache format. This ASP.NET rewriteruses the HTTP protocol instead of binary socket and can be accessed directly in a browser, so youcan easily check whether Tomcat is working. Please refer to the Installation and Upgrade Guide andthe latest articles on the Sage CRM Ecosystem for more information.Extensibility ArchitectureThe Extensibility Module ('EM') provides users with a range of powerful functions that allow them tocustomize and extend the existing CRM product.These functions are made available through the CRM ActiveX object, which is made up of a numberof CRM methods and properties. The CRM object components have a variety of functions, whichrender HTML and display Screen and List objects-previously defined in the CRM system itself.There are also a number of database connectivity options available. These include searching,inserting, updating, and deleting data to and from CRM data, as well as data from external tables anddatabases.2-2 Sage CRM
Chapter 2: OverviewExtensibility ArchitectureYou can establish if the Extensibility Module is present in your CRM installation asfollows: Select Administration Customization Company.If you have the Extensibility Module, you will see Blocks and TableScripts tabs:.NET ArchitectureAs the core of the Sage CRM solution is represented by an ActiveX component, Sage has leveragedMicrosoft’s Interop technology to expose this existing COM component to managed code (that iscode executed by Microsoft's .NET Framework Common Language Runtime).The process of exposing COM components to the .NET Framework can be challenging, involvingsteps such as converting the coclasses and interfaces contained in a COM type library to metadataand deploying Interop applications as strong-named, signed assemblies in the global assemblycache.The Sage CRM SDK for .NET handles these low-level implementation details by providing aredistributable package that installs the .NET component onto your system and makes it readilyavailable within the Visual Studio environment.The diagram below shows this architecture.Developer Guide 2-3
Chapter 2.NET Architecture1. CustomDotNetDll action calls Application extension.2. CustomDotNetDll action uses COM interop to trigger behaviour in CRM .NET Component.l Passes CRM Application Extension DLL name and session information.lCalls CRM Application Extension.3. CRM Application Extension processes data and generates and returns HTML.The Sage CRM .NET API conforms to the .NET 2.0 Framework. It provides a type library thatexposes the Sage CRM objects, properties, and methods. Through its core libraries the Sage CRM.NET Component manages both data access and web interface generation. Projects developedusing the Sage CRM .NET Component will be compiled into a dll and called directly from within SageCRM. By using Sage CRM meta data Application Extensions constructed using the Sage CRM.NET API will look, feel and perform exactly like core system pages.Reference to the Sage CRM .NET component from within ASP.NET projects is notsupported.Any programming language that conforms with the .NET 2.0 Framework can be used for thedevelopment of Sage CRM Application Extensions (e.g. J#, C# VB.NET etc).NET vs Classic ASPBefore the release of Sage .NET SDK, the main method for developers who wished to add custompages to the CRM environment was through the creation of ASP pages. As these pages were codedin simple text editors—typically Notepad or WordPad—developers could not use features offered byIDEs, such as IntelliSense (providing drop-down lists of available objects, properties, and methods),syntax checking, and debugging tools. The absence of IntelliSense, in particular, usually requireddevelopers accessing functionality provided by the Sage CRM API to refer repeatedly to the relevantdocumentation.In addition, the absence of meaningful syntax checking and debugging tools in text editors meant thatdevelopers could not gauge the correctness of their ASP coding until the page was upload to the Sage2-4 Sage CRM
Chapter 2: OverviewCRM environment and running in the context of new tab. Developers reload pages in the Sage CRM’sCustom Pages folder to check whether their ASP code is working as intended.The simplicity of the ASP/Sage CRM API/Text Editor combination makes it appropriate to solutionsthat require simple coding implementations and rapid deployment. However, given that codingseparate ASP pages is not conducive to best programming practice (specifically, OOP principles andassociated practices, such as refactoring) and that creating multi-file projects can demand moreadvanced project tools, developers should appreciate a more sophisticated solution for certaincustomization tasks.By allowing developers to access the Sage CRM through the .NET framework, several of the issuesassociated with earlier customization solutions are comprehensively addressed.Instead of coding in a basic text editor, developers can now use the suite of features provided byMicrosoft’s Visual Studio. With the Sage CRM .NET component properly referenced by theapplication, Visual Studio treats objects from the Sage CRM API in the same way as any otherinitialized C# object. This means when, for example, you are using a CRM object and are calling oneof its methods, the IntelliSense prompts you with a list of the object’s properties and methods whenyou type the “.” operator after the object name.Also, rather than coding in a scripting language that initializes and uses both ASP and Sage CRM APIobjects, the .NET framework enables developers to write in C# or Visual Basic.NET, highly objectoriented languages that can draw on the resources of .NET’s class library.In addition, whereas the source code in ASP pages can be accessed by users selecting the View–Source option from the browser menu, .NET applications are compiled into binary DLLs beforedeployment. Preventing access to source code means improved security and better protection ofintellectual property.SecurityCRM is modelled on an n-tier architecture. Each tier includes a number of security mechanisms.Application Level SecurityEvery user is assigned a valid username and password. The only person allowed to add or removeusers is the System Administrator. Within the system, each user can be assigned different levels ofaccess security depending on their job role. When IIS uses SSL encryption, the system is aware ofthis, and when the client attaches any documents to a form in the system, it sends it through theencrypted sessions.lUser Authentication/Password Setup. A user requires a Logon ID and password to accessthe system. The user's password is encrypted both within the system and in the database formaximum security.lTab and Team Restrictions. Access to individual tabs within CRM can be restricted by theSystem Administrator, as can the level of access that each user is allocated. The SystemAdministrator can also assign users to teams, which further categorizes and restricts levels ofaccess to individual tabs.lSecurity Profiles and Territories. The System Administrator can manage security accessrights across the organization by setting up Territory Profiles and, if required, securityTerritories. A Profile is a way of grouping users together when defining access rights (View,Update, Insert, Delete). A Territory is a way of further dividing user rights by location or othercriteria. For example, you may want users in the Europe territory to view all Opportunitieswithin the USA territory but not to be able to update them. Complex inter-territory securityrights and exception handling are also catered for using Territory Policies. Profiles andTerritories are set up from Administration Users Security, please refer to the SystemAdministrator Guide for more information.Server Level SecurityYou can use all three or a combination of the following methods to secure the CRM server:Developer Guide 2-5
Chapter 2: OverviewOverview of Customizable AreasAside from integrating ASP pages into CRM, you can also customize the following areas by using thesystem interface to enter scripts and change settings:Customizable Without EMAreaAdditionalCustomization with EMFieldsCreate new fields and customize existing ones.ScreensCustomize existing screens that are in the CRMdatabase. Add and remove fields that werecreated in the system.Add new screens.ListsCustomize existing lists that are in the CRMdatabase.Add new lists.TabsAdd new tabs to tab groups that are in the CRMdatabase. Customize main menu buttons.Add new tab groups.Link tabs to customfiles or URLs.Link tabs to runblockand runtabgroupfunctionality.ViewsAdd new views. Change some existing views.BlocksAdd Blocks.TableScriptsAdd Table and EntityScripts.Tables andDatabases*Connect to a newtable.Connect to a newdatabase.Create a new table.ButtonGroups*ComponentManager**Add new buttongroups.Upload a component.Record and scriptcomponents.* Tables And Databases and Button Groups are customized from Administration AdvancedCustomization.** Component Manager is accessed from Administration Customization.Database OverviewCRM EntitiesIn Sage CRM, an "Entity" is a representation of a real world entity such as a Company, a Person, or aSales Opportunity. The entity may have relationships with other Entities. For example, a Companycan have many People working for it. Each of these Entities may then have other entities inDeveloper Guide 2-7
Chapter 2relationships with them, for example People can have Communications and Sales Opportunitiesassociated with them.CRM entities are made up of information from several different tables linked in a logical way. Forexample, the Company entity is made up of information from the Company, Address, Phone, andPerson tables.CRM includes the following primary ationlLeadslQuoteslOrdersUnlike database entities, CRM entities are several tables linked together in a logicalbusiness grouping.MetadataIn CRM, Metadata encompasses all of the information that is required to make sense of the storedbusiness data. For example, there are metadata tables that contain field captions, or convert codevalues from drop-down fields into meaningful information.The system database contains CRM metadata tables. These are prefixed with the word 'custom'.Using SQL and TriggersYou can use the CRM Query object's SQL method to include SQL statements in an ASP page.You can also use SQL conditional clauses within the system in Administration Customization Entity Tabs. For more information please refer to the System Administrator Guide.CRM also includes Table and Entity level scripting functionality that you can include as an alternativeto SQL triggers.2-8 Sage CRM
Chapter 3After the include file, you must open the ASP delimiters % % to tell the ISAPI.DLL that thecontained ASP code will execute on the server, and then call the CRM object methods required foryour page.In the example below, we call the CRM object's GetBlock method to initialize one of the child blocksthat implement core CRM functionality. This method is likely to feature at the start of most of yo
Sage.CRM.WebObjectNamespace 11-7 Sage.CRM.ControlsNamespace 11-7 DeveloperGuide Contents-ix. Contents Sage.CRM.DataNamespace 11-7 Sage.CRM.UtilsNamespace 11-7 Sage.CRM.BlocksNamespace 11-8 Sage.CRM.HTMLNamespace 11-8 Sage.CRM.UINamespace 11-8 Installingthe.NETSDK 11-8
Integrate Sage CRM with Sage 300 Use Sage CRM features that are added during integration How to Use this Guide The first five chapters of this guide are for Sage CRM implementers. Chapter 6, "Using Sage CRM with Sage 300," is for Sage CRM users. We assume that implementers: Have experience implementing and troubleshooting Sage CRM
MailChimp is an email marketing solution that's integrated with Sage CRM to let you create online campaigns, send emails, and track results. Integrating MailChimp with Sage CRM makes email marketing easier and more effective. There's no need for multiple contact databases -Sage CRM contacts are pushed to MailChimp.
Dynamics 365 CRM Integration with - Sage 100 Sage 300 Sage X3 Greytrix Flagship GUMU Migration products are: . GUMU for Sage CRM with QuickBooks Integration has immense potential as it transforms handy Accounting software into a powerhouse of insights by linking it to Customer information
This guide gives you a quick start to core Sage CRM functionality - Basic skills, Sales, Marketing, Customer Service, and Administration. Please note that while the document refers to Sage CRM, CRM, or the CRM system throughout, regional products may use different brand names. . User Guide: Moving Around .
Integration with Third Party solutions Integration of Sage CRM with ERP systems and other third party applications using Web Services and Sage CRM .NET API. Installation & Configuration Easy installation, configuration and online support for Sage CRM upgrades along with
*All Sage CRM licenses sin c Sage CRM customer breakdow seat size and % of customer b Help grow your business Win more customers and retain them The right insights to make business decision pical Sage CRM customers
Installation Guide. Where To Now? Installation and Administration Guide 1 –5 : Sage 300 Integrated with Sage CRM : Similar to Sage 300, Sage CRM can be installed locally, or on a server, or be deployed on the Web. In the illustration below, we’ve shown the Sage 300 Web server and the
evaluation of English Pronunciation and Phonetics for Communication (second edition) and English Phonology (second . textbook is English Phonology written and edited by Wang Wenzhen, which was first published by Shanghai Foreign Language Educational Press in 1999. It was modified and republished in 2008 and also came with a CD. 4 Polyglossia Volume 25, October 2013 2.4 Procedure and Data .