Sage CRM 2020: Example Web Services Project Code (Test Harness)

I have updated the Web Services Test Harness Solution that I use to help explain the use of the different methods of the SOAP Webservices. You can find this updated version here: https://community.sagecrm.com/partner_community/m/example_components__developer_resources/28620.aspx

This is just one of the resources available for anyone wanting to get to grips with the Web Services. 

The Web Services are documented within the Sage CRM Developer Guide.  You can always find the latest version on the Help Center.

There are some short lessons recorded that explain how to get started using the Web Services. You can find the links to the lessons in the eLearning area.

The purpose of the "SOAP Web Services Test Harness " example Visual Studio solution is to show how each of the main web services methods can be used.

The project is designed as a teaching aid and can be used to test simple examples of data retrieval and data update.

NOTE:  This application assumes that the values of drop-down boxes are returned as strings.  This can be changed within the Web Services configuration screen.
Administration → System → Web Services
The project has been revised and updated for Sage CRM 2020 R1.
Examples within the project show how the following can be accomplished:
  • Logon and Log Off
  • Check the version of Sage CRM
  • Dynamically change the connection string
  • Retrieve Current User information
  • Insert a New Company (and associated Person, Phone, E-mail and Address records)
  • Find Company by ID using queryentity()
  • Find a Person by E-mail address using query()
  • Find Companies using queryrecord()
  • Find Companies using query()
  • Find Companies using queryidnodate()
  • Handle dropdown lists
  • Edit Company Data
  • Insert an additional address for a company using add()
  • Insert a communication and comm_link record for a company using add()
  • Insert an opportunity for a company using addrecord()
  • Insert an additional person for a company using add()
  • Delete a company using delete()
  • Insert a disabled user using addresource()
  • List tables exposed to web services using getallmetadata()
  • List fields of a table using getallmetadata()
  • Use metadata information to deduce relationships in database
The example project should provide you with enough examples to allow you to understand how each of the different Web Service interface methods support full Create, Read, Update and Delete (CRUD) behaviour in implementations of Sage CRM.
Anonymous