on 07-08-2005 2:26 PM
There's a lot of buzz around free international internet phone calls. Me too, I installed Skype and found it extremely easy to use.
So, I decided to think about how to 'integrate' Skype with SAP Business One.
Guess what? In 5 minutes I was up and running.
For the benefit of other people who might find this useful I provide the simple steps to make this happen. Also, it might be a good idea to forward this information to your SAP Business One sales guys: at least one competing product (www.hansaworld.com) has proudly presented this functionality.
1. Create a User Defined Field to Business Partner (or Business Partner Contacts, or both)
Title: SKYPEID
Description: Skype ID
Type: General
Structure: Link
Click OK
2. Navigate to the Skype ID field in BP
3. Ctrl+Doubleclick
4. Enter a callto: -link to the File name field on the File Open dialog
For example: callto://xprts.biz
You may use the above Skype ID for testing
5. Now doubleclicking the SkypeID field kicks off a Skype session
Happy Skyping,
Juha Lassila
OK, enabling outgoing Skype calls was a piece of cake.
What about incoming calls? Guess what? It took a bit more
than 5 minutes to have a working prototype that detects
incoming calls and then opens the respective Business Partner
records in SBO.
You'll need to do some coding with SBO for finding out
whether the SkypeID is in SBO (using DIAPI) and if yes then
open the BP form and finding the BP (UIAPI).
For Skype API, the C++ experts will find useful example code
at Skype at:
http://share.skype.com/developer_zone/documentation/documentation
Others (like me) may prefer Khaoslabs Skype API COM Wrapper
http://www.khaoslabs.com/index.php?page=skypeapi
Happy Skyping (In & Out)
Juha Lassila
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I received several requests to post/send the prototype I wrote. It isn't practical to post the full example VB.NET solution that I inserted my code into.
Therefore, I provide a link to a page where you can download the modified example:
http://www.xprts.biz/skype.html
The following snippet contains the beef:
-- snip --
Private Sub objSkype_CallStatusChanged(ByVal sender As Object, ByVal e As AxSKYPEAPILib._IAccessEvents_CallStatusChangedEvent) Handles objSkype.CallStatusChanged
Dim objIncomingCall As SKYPEAPILib.Call
Dim intCallerBoType As SAPbobsCOM.BoObjectTypes
Dim strBPCardCode As String
Dim strBPCntctCode As String
Dim strCallText As String
If e.status = SKYPEAPILib.SkypeCallProgress.prgRinging Then
Dim callType As SKYPEAPILib.SkypeCallType
callType = e.changedCall.Type
If (callType = SKYPEAPILib.SkypeCallType.ctypIncomingP2P) Or _
(callType = SKYPEAPILib.SkypeCallType.ctypIncomingPSTN) Then
objIncomingCall = e.changedCall
intCallerBoType = SBOGetBPCodeOfSkypeID(objIncomingCall.PartnerHandle, strBPCardCode, strBPCntctCode, strCallText)
Select Case intCallerBoType
Case SAPbobsCOM.BoObjectTypes.oBusinessPartners
If MessageBox.Show("Answer call from SBO: " & strCallText & objIncomingCall.PartnerDisplayName + "?", "Incoming Call", MessageBoxButtons.YesNo) = DialogResult.Yes Then
objIncomingCall.Status = SKYPEAPILib.SkypeCallProgress.prgInProgress
Call SBOOpenBPFormAndFindBPCode(strBPCardCode)
Else
objIncomingCall.Status = SKYPEAPILib.SkypeCallProgress.prgCancelled
End If
Case SAPbobsCOM.BoObjectTypes.oContacts
Case Else
If MessageBox.Show("Answer call from " + objIncomingCall.PartnerDisplayName + "?", "Incoming Call", MessageBoxButtons.YesNo) = DialogResult.Yes Then
objIncomingCall.Status = SKYPEAPILib.SkypeCallProgress.prgInProgress
Else
objIncomingCall.Status = SKYPEAPILib.SkypeCallProgress.prgCancelled
End If
End Select
End If
End If
End Sub
Private Sub SBOOpenBPFormAndFindBPCode(ByVal strBPCode As String)
MsgBox("Let's open a BP: " & strBPCode)
Dim frm As SAPbouiCOM.Form
frm = SBOGetNewBPForm()
SBOFindBP(frm, strBPCode)
End Sub
Private Function SBOGetNewBPForm() As SAPbouiCOM.Form
Dim frm As SAPbouiCOM.Form
Const B1MENU_BP_BUSINESS_PARTNER_MASTER_DATA As String = "2561"
SBOApplication.ActivateMenuItem(B1MENU_BP_BUSINESS_PARTNER_MASTER_DATA)
frm = SBOApplication.Forms.ActiveForm
Return (frm)
End Function
Private Sub SBOFindBP(ByVal frm As SAPbouiCOM.Form, ByVal strBPCode As String)
Dim itmBPCode As SAPbouiCOM.Item
Dim edtBPCode As SAPbouiCOM.EditText
itmBPCode = frm.Items.Item("5")
edtBPCode = itmBPCode.Specific
edtBPCode.Value = strBPCode
frm.Items.Item("1").Click() 'Click on Find
End Sub
Private Function SBOGetBPCodeOfSkypeID(ByVal strSkypeID As String, ByRef strBPCardCode As String, ByRef strBPCntctCode As String, ByRef strCallText As String) As SAPbobsCOM.BoObjectTypes
Dim strSQL As String
strSQL = "SELECT CardCode FROM OCRD WHERE U_SKYPEID LIKE 'callto://[SKYPEID]'"
strSQL = Replace(strSQL, "[SKYPEID]", strSkypeID)
strBPCardCode = SBOGetSingleValueWithSQL(strSQL)
If Not strBPCardCode Is Nothing Then
strSQL = "SELECT CardName + ' ' + City + ' ' + MailCountr FROM OCRD WHERE U_SKYPEID LIKE 'callto://[SKYPEID]'"
strSQL = Replace(strSQL, "[SKYPEID]", strSkypeID)
strCallText = SBOGetSingleValueWithSQL(strSQL)
Return (SAPbobsCOM.BoObjectTypes.oBusinessPartners)
ElseIf True = True Then
End If
Return (SAPbobsCOM.BoObjectTypes.oBusinessPartners)
End Function
-- snip --
Be my guest
Juha
This sure looks interesting...
Thanks for sharing!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your valuable input!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.