Example Web Services Project Code for Sage CRM 2017 R1

Hints, Tips and Tricks

Technical Hints Tips and Tricks that cover customization and development using Sage CRM. API usage and coding are covered.

Example Web Services Project Code for Sage CRM 2017 R1

  • Comments 1
  • Likes

As part of the update of resources that I use in training I revisited the Web Services Test Harness Solution.  You can find this updated version in the partner folder 'General Development Resources'.  

This is just one of the resources available for technical staff wanting to get to grips with the Web Services.  You will however need to have Business Partner rights on the Community to download the Solution.  If you are a Business Partner and you are logged onto the community but you can not find the file then send the Sage CRM team (sagecrmteam@sage.com) an email and we will make sure you have access.

The Web Services are documented within the Sage CRM 2017 R1 developer guide.  This can be found here on the Help Center.

If you are customer or partner who is a member of the developer community there are other resources that can help you too. There are the lessons that recorded as part of the regular cycle of developer training. You can find the latest lessons in the training resources section. 

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

It might not look very pretty as the project is only designed as a teaching aid and is used in training classes to provide simple examples of data retrieval and data update.

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.

  • Excellent - thanks for sharing - a useful sales tool as well, if you need to show technical capabilities.