"Salesforce Office Toolkit"의 두 판 사이의 차이
둘러보기로 가기
검색하러 가기
잔글 |
|||
(같은 사용자의 중간 판 하나는 보이지 않습니다) | |||
1번째 줄: | 1번째 줄: | ||
− | ==Office Toolkit Developer's Guide== | + | == Office Toolkit Developer's Guide == |
+ | |||
SForceOfficeToolkitLib3.dll (Office Toolkit 3.0) | SForceOfficeToolkitLib3.dll (Office Toolkit 3.0) | ||
*Sample Program (~.vbs) | *Sample Program (~.vbs) | ||
+ | |||
Option Explicit | Option Explicit | ||
− | + | On Error Resume Next | |
− | + | 'On Error GoTo handleError | |
− | + | Dim WithEvents g_sfApi As SForceOfficeToolkitLib3.SForceSession3 | |
− | + | ||
− | + | Set g_sfApi = New SForceOfficeToolkitLib3.SForceSession3 | |
− | + | SampleLogin = g_sfApi.Login("~", "~"); | |
− | + | ||
− | + | Dim account As SObject3 | |
− | + | Set account = g_sfApi.CreateObject("account"); | |
− | + | account("name") = "~"; | |
− | + | account.Create | |
− | + | account.Refresh | |
− | + | ||
− | + | account.Update | |
− | + | ||
− | + | Dim qr As QueryResult3 | |
− | + | Dim v As Variant | |
− | + | Dim s As SObject3 | |
− | + | ||
− | + | Set qr = g_afApi.Query("~", False); | |
− | + | For Each v In qr | |
− | + | Set s = v | |
− | + | Next v | |
− | + | ||
− | + | handleError: | |
− | + | If g_sfApi.Error <> NO_SF_ERROR Then | |
− | + | MsgBox g_sfApi.ErrorMessage | |
− | + | End If | |
var Account_queryResult; | var Account_queryResult; | ||
− | + | Account_queryResult = executeSalesForceQuery("Select JHKTestField__c, ID from Account where id = '{!Account_ID}'"); | |
− | + | var Account_e = new Enumerator(Account_queryResult); | |
− | + | var sObject = new Object(); | |
− | + | sObject[0] = Account_e.item(0); | |
− | + | sObject[0].Item('JHKTestField__c').Value = workgroup; | |
− | + | var Update_queryResult; | |
− | + | var binding = new ActiveXObject('SForceOfficeToolkit.SForceSession'); | |
− | + | binding.SetServerUrl('{!API_Enterprise_Server_URL_40}'); | |
− | + | binding.SessionId = '{!API_Session_ID}'; | |
− | + | var queryResult; | |
− | + | queryResult = binding.update(sObject, false); | |
Option Explicit | Option Explicit | ||
55번째 줄: | 57번째 줄: | ||
Private Sub cmdOK_Click() | Private Sub cmdOK_Click() | ||
− | + | If oSFDC.Login(Me.txtUserName.Text, Me.txtPassword.Text, False) Then | |
− | + | MsgBox "Login successful" | |
− | + | Else | |
− | + | MsgBox "Login failed" | |
− | + | End If | |
End Sub | End Sub | ||
Private Sub cmdSearch_Click() | Private Sub cmdSearch_Click() | ||
− | + | oSFDC.Login Me.txtUserName.Text, Me.txtPassword.Text, False | |
− | + | sSQL = "Select Id, Name, BillingStreet, BillingCity, BillingState, BillingPostalCode from Account where name = '" & Me.txtQueryName.Text & "'" | |
− | + | Set qs = oSFDC.Query(sSQL, False) | |
− | + | If qs.Size = 0 Then | |
− | + | MsgBox "No data found for search criteria." | |
− | + | End If | |
− | + | For Each oItem In qs | |
− | + | Me.txtName.Text = oItem("Name").Value | |
− | + | Me.txtBillingStreet.Text = oItem("BillingStreet").Value | |
− | + | Me.txtBillingCity.Text = oItem("BillingCity").Value | |
− | + | Me.txtBillingState.Text = oItem("BillingState").Value | |
− | + | Me.txtBillingPostalCode.Text = oItem("BillingPostalCode").Value | |
− | + | Exit For | |
− | + | Next oItem End Sub | |
Private Sub cmdUpdate_Click() | Private Sub cmdUpdate_Click() | ||
− | + | If Not oItem Is Nothing Then | |
− | + | oItem("Name").Value = Me.txtName.Text | |
− | + | oItem("BillingStreet").Value = Me.txtBillingStreet.Text | |
− | + | oItem("BillingCity").Value = Me.txtBillingCity.Text | |
− | + | oItem("BillingState").Value = Me.txtBillingState.Text | |
− | + | oItem("BillingPostalCode").Value = Me.txtBillingPostalCode.Text | |
− | + | ' *** The program hanges when the .Update routine is executed against the item *** | |
− | + | oItem.Update | |
− | + | End If | |
End Sub | End Sub | ||
− | + | [[Category:기술 자료실|Category:기술_자료실]]<br/>[[Category:Salesforce|Category:Salesforce]]<br/>[[Category:CRM|Category:CRM]]<br/>[[Category:Cloud|Category:Cloud]] | |
− | [[Category:기술_자료실]] | + | == 지원 업체 == |
− | [[Category:Salesforce]] | + | {{지원업체}} |
− | [[Category:CRM]] | ||
− | [[Category:Cloud]] |
2018년 1월 31일 (수) 13:26 기준 최신판
Office Toolkit Developer's Guide
SForceOfficeToolkitLib3.dll (Office Toolkit 3.0)
- Sample Program (~.vbs)
Option Explicit On Error Resume Next 'On Error GoTo handleError Dim WithEvents g_sfApi As SForceOfficeToolkitLib3.SForceSession3 Set g_sfApi = New SForceOfficeToolkitLib3.SForceSession3 SampleLogin = g_sfApi.Login("~", "~"); Dim account As SObject3 Set account = g_sfApi.CreateObject("account"); account("name") = "~"; account.Create account.Refresh account.Update Dim qr As QueryResult3 Dim v As Variant Dim s As SObject3 Set qr = g_afApi.Query("~", False); For Each v In qr Set s = v Next v handleError: If g_sfApi.Error <> NO_SF_ERROR Then MsgBox g_sfApi.ErrorMessage End If var Account_queryResult; Account_queryResult = executeSalesForceQuery("Select JHKTestField__c, ID from Account where id = '{!Account_ID}'"); var Account_e = new Enumerator(Account_queryResult); var sObject = new Object(); sObject[0] = Account_e.item(0); sObject[0].Item('JHKTestField__c').Value = workgroup; var Update_queryResult; var binding = new ActiveXObject('SForceOfficeToolkit.SForceSession'); binding.SetServerUrl('{!API_Enterprise_Server_URL_40}'); binding.SessionId = '{!API_Session_ID}'; var queryResult; queryResult = binding.update(sObject, false); Option Explicit Dim oSFDC As New SForceOfficeToolkitLib.SForceSession Dim qs As SForceOfficeToolkitLib.QueryResultSet Dim oItem As SForceOfficeToolkitLib.SObject Dim sSQL As String Private Sub cmdOK_Click() If oSFDC.Login(Me.txtUserName.Text, Me.txtPassword.Text, False) Then MsgBox "Login successful" Else MsgBox "Login failed" End If End Sub Private Sub cmdSearch_Click() oSFDC.Login Me.txtUserName.Text, Me.txtPassword.Text, False sSQL = "Select Id, Name, BillingStreet, BillingCity, BillingState, BillingPostalCode from Account where name = '" & Me.txtQueryName.Text & "'" Set qs = oSFDC.Query(sSQL, False) If qs.Size = 0 Then MsgBox "No data found for search criteria." End If For Each oItem In qs Me.txtName.Text = oItem("Name").Value Me.txtBillingStreet.Text = oItem("BillingStreet").Value Me.txtBillingCity.Text = oItem("BillingCity").Value Me.txtBillingState.Text = oItem("BillingState").Value Me.txtBillingPostalCode.Text = oItem("BillingPostalCode").Value Exit For Next oItem End Sub Private Sub cmdUpdate_Click() If Not oItem Is Nothing Then oItem("Name").Value = Me.txtName.Text oItem("BillingStreet").Value = Me.txtBillingStreet.Text oItem("BillingCity").Value = Me.txtBillingCity.Text oItem("BillingState").Value = Me.txtBillingState.Text oItem("BillingPostalCode").Value = Me.txtBillingPostalCode.Text ' *** The program hanges when the .Update routine is executed against the item *** oItem.Update End If End Sub
지원 업체
SuiteCRM을 사용한 영업관리, 고객관리는 아래 담당자에게 연락하여 주시면, 빠르고 친절하게 전문적인 답변을 드리겠습니다.
영업 문의 | sales@obcon.biz | 010-4667-1106 | 영업 대표 |
기술 문의 | tech@obcon.biz | 구축/컨설팅 담당 | |
고객 지원 | support@obcon.biz | 고객 지원 담당 |