Hire Me! I'm currently looking for my next role in developer relations and advocacy. If you've got an open role and think I'd be a fit, please reach out. You can also find me on LinkedIn.

If you would like to integrate your ColdFusion site with SugarCRM, please see the new ColdSugar project at RIAForge. This is a simple CFC that allows for complete integration with a SugarCRM account. You can get any kind of data and perform updates as well. I wish I could say there was something sexy about this code, but their API was relatively simple to work with.

Some sample code:

<cfset coldsugar = createObject("component", "sugarcrm").init("http://eval.sugarondemand.com/xxx/soap.php?wsdl", "admin", "foo", true)>

<cfdump var="#coldsugar.getList('Opportunities')#" label="Opportunities">

<cfset q = "opportunities.name LIKE 'TI%'"> <cfdump var="#coldsugar.getList(type='Opportunities',query=q)#" label="query=#q#">

<cfdump var="#coldsugar.getList(type='Opportunities',orderby='amount_usdollar')#" label="sort by amount_usdollar">

<cfdump var="#coldsugar.getList(type='Opportunities',deleted=true)#" label="deleted">

<cfdump var="#coldsugar.getList(type='Opportunities',fields='name,amount_usdollar')#" label="Just name and amount_usdollar">

<cfdump var="#coldsugar.getList('Contacts')#" label="Contacts">

<cfdump var="#coldsugar.getList('Accounts')#" label="Accounts">

<cfdump var="#coldsugar.getList('Documents')#" label="Documents">

<cfdump var="#coldsugar.getList('Calls')#" label="Calls">

<cfdump var="#coldsugar.getList('Meetings')#" label="Meetings">

<cfdump var="#coldsugar.getList('Tasks')#" label="Tasks">

<cfdump var="#coldsugar.getList('Notes')#" label="Notes">

<cfdump var="#coldsugar.getFields('Emails')#" label="Email Fields">

<cfset emails = coldsugar.getList('Emails')> <cfdump var="#emails#" label="Emails">

<cfset email = coldsugar.get('Emails', emails.id[1])> <cfdump var="#email#" label="Emails">

<cfset email.status = 'replied'> <cfset r = coldsugar.save('Emails',email)> <p> Result of save is #r# </p>

<cfset coldsugar.logout()>

<p> Done with tests. </p> </cfoutput>