- Office Toolkit Developer's Guide
- 지원 업체
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](0.md) = Account_e.item(0);
sObject[0](0.md).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
[[Category:기술 자료실|Category:기술_자료실]]
[[Category:Salesforce|Category:Salesforce]]
[[Category:CRM|Category:CRM]]
분류: Cloud
지원 업체
{{지원업체}}
최종 수정일: 2024-09-30 12:26:18
이전글 :
다음글 :