Sage CRM – Tips, Tricks and Components
Greytrix is one of the oldest Sage Development Partner of two decades for Sage CRM and has been awarded "Sage Development Partner of the Year" three times in the past years. Greytrix has been working on customization and configuration of products in Sage CRM since decades and have accumulated hundreds of man years of experience. In these blogs, Greytrix will endeavour to share its knowledge and expertise and save upto 90% of project cost for Sage CRM users by presenting a list of useful small components, tools and add-ons for Sage CRM! Contact us at sage@greytrix.com
Follow us on LinkedIn Follow us on Twitter Follow us on Facebook Follow us on YouTube
Skip to content
  • Home

Auto login using SageCRM WebServices

By greysagecrm | August 27, 2009
0 Comment

As we already know that Sage CRM’s Web Service API (application programming interface) enables developers to manipulate CRM records remotely with SOAP (Simple Object Access Protocol) over HTTP using XML (Extensible Markup Language). It is possible to access a CRM server or a hosted system from a specified client machine in order to read, create, update, or delete records for Companies, People, Opportunities, or Cases.

The main steps involved in communicating with the Sage CRM Web Service involve The user then accesses the WSDL file from the client and prepares the request. The client machine passes the request with its parameters to the Web Service. The Web Service processes the request and sends a response to the client. The client receives the response synchronously, and it processes the data returned or it deals with the error.

In order to read/write any records in SageCRM you first have to connect to the SageCRM system. The below example illustrates how we can do that.

private static void LogonToCRMSystem()
{
try
{
SID = binding.logon(“admin”, “”);
binding.SessionHeaderValue = new SessionHeader();
binding.SessionHeaderValue.sessionId = SID.sessionid; //Persistent SID
return true;
}
catch (SoapException e)
{
Write(e.Message);
}
catch (Exception e)
{
Write(e.Message + “n” + e.StackTrace);
}
}

Here if you notice we have to pass the SageCRM user name and password in order to login to SageCRM using web service. But can you login via web services without a user name and password!!! Yes you can. But for this you need to know something else. The SageCRM’s active session id and URL, of course. If you know the session id then you can even use as a substitute for COM API. Here is how you do it.

private static void LogonToCRMSystem()
{
try
{
binding.Url = getWsUrl(url);

//assign the session id
binding.SessionHeaderValue.SessionHeaderValue = new SessionHeader();
binding.SessionHeaderValue.sessionId = sessionId;

return true;
}
catch (SoapException e)
{
Write(e.Message);
}
catch (Exception e)
{
Write(e.Message + “n” + e.StackTrace);
}
}

Related Posts

  • Login Error in Sage CRM
  • Password Reset Mechanism in Sage CRM
  • Auto Generation of Cases in Sage CRM after Email In
Category: Sage CRM Tags: login, webservices
Post navigation
← Make the maximum out of Library functionality in CRM NEWSLETTER tab in Self Service →

Greytrix Website and Blogs

  • Greytrix
  • GUMU™ Cloud
  • Greytrix Africa
  • Greytrix Australia
  • Sage X3 – Tips, Tricks and Components
  • Sage 100 & 500 ERP Tips and Tricks
  • Sage 300 – Tips, Tricks and Components
  • Salesforce.com Tips and Tricks by Greytrix
  • Sage Business Cloud – Tips, Tricks and Components
sage crm integration

Recent Posts

  • GUMU™ Security Matrix enhancement for Sage CRM – Sage 100 Integration.
  • Trouble Shooting error message of ‘Access Denied or unkownname (Exception from HRESULT: 0X80020006(DISP_E_UNKOWNNAME))’ in GUMU Integration
  • Checking Progress Mass Emails in Sage CRM
  • Salesperson Wise Dashboard
  • Vendor Tabs in GUMU™ Sage CRM – Sage 100 Integration.

Archives

Awards

Greytrix Top ISV Partner
Greytrix Revenue Growth Enterprise Business
Greytrix Africa Highest Revenue
Greytrix Prtner of the Year
Greytrix Partner Award
Copyright 2022
Sage CRM – Tips, Tricks and Components
Iconic One Theme | Powered by Wordpress