|
Public Class Incident
Public Function Create(ByVal ConnectionSettings As CrmHelper, ByVal CaseName As String) As GenericEntity
Dim crm As New CrmService.sugarsoap
Dim auth As New CrmService.user_auth
auth.user_name = ConnectionSettings.crmUserId
auth.password = ConnectionSettings.crmPassword
auth.version = ConnectionSettings.crmVer
crm.Url = ConnectionSettings.crmURL
Dim ReturnObject As New GenericEntity
Try
Dim test As String = crm.test("test")
Dim a As Object = crm.login(auth, "SoapTest")
Catch ex As Exception
ReturnObject.IsError = True
ReturnObject.Message = "Connection to SugarCrm was unsuccessfull"
Return ReturnObject
End Try
Try
Dim caseid As String = crm.create_case(ConnectionSettings.crmUserId, ConnectionSettings.crmPassword, CaseName)
ReturnObject.Message = "Case created in SugarCrm with CaseID - " + caseid
Return ReturnObject
Catch ex As Exception
ReturnObject.IsError = True
ReturnObject.Message = "Unable to create case in SugarCrm ErrorDetails - " + ex.Message
Return ReturnObject
End Try
End Function
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.