• Garry Lindsay
  • NEWBIE
  • 0 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 21
    Replies

Here is my debugging output :-

Insert : Field = Company | Value = qasem, muhannad
Insert : Field = LeadSource | Value = iKaptivate
Insert : Field = inq_type__c | Value = application
Insert : Field = iKap_Status__c | Value = iKaptivate Saved
Insert : Field = iKap_Last_Modified_Date__c | Value = 12/20/2004 15:35 PM
Insert : Field = iKap_Start_Date__c | Value = 12/20/2004 15:27 PM
Insert : Field = DeL_Employer__c | Value = red lobster
Insert : Field = Alternate_Phone__c | Value = 111111111
Insert : Field = PostalCode | Value = 19111
Insert : Field = City | Value = philadelphia
Insert : Field = BirthDate__c | Value = 09/18/0987
Insert : Field = Email | Value = email@cs.com
Insert : Field = SSN__c | Value = 111111111
Insert : Field = Phone | Value = 215678890
Insert : Field = FirstName | Value = muhannad
Insert : Field = Street | Value = xxxxxxxxxxxxxxxxx
Insert : Field = LastName | Value = qasem
Insert : Field = State | Value = PA
Insert : Field = Country | Value = USA
Insert : Field = Citizenship__c | Value = Yes
Insert : Field = Gender__c | Value = Male
Insert : Field = ikap_applicant_id__c | Value = 493137
Insert : Field = program__c | Value = Bachelor of Science in Computing Technology
Insert : Field = degree_level__c | Value = Undergraduate
Insert : Field = du_college__c | Value = U
Insert : Field = ikap_application_id__c | Value = 202592
Insert : Field = ikap_this_app_id__c | Value = 445045
Creating muhannad qasem, ThisAppID : 445045 record in SalesForce...
Error: -2147467259 Source: clssForceHelper.asp : CreatesForceRecord : org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
Done with muhannad qasem, ThisAppID : 445045 record in SalesForce

Here is the code that generates this output :-

Set sobj = p_sfdc.CreateObject(p_strCurrentObjectName)
  
  FOR EACH strField IN dictNewFieldValues
   strValue = dictNewFieldValues(strField)
   
   'Response.Write("Before : Field = " & strField & " | Value = " & strValue & "<br>")
     
   SELECT CASE UCASE(strField)
    CASE "APPLICATION_STARTDATE__C"
    CASE ELSE
     strValue = dictNewFieldValues(strField)
     IF LEN(strValue) > 0 Then
      Response.Write("Insert : Field = " & strField & " | Value = " & strValue & "<br>")
      sobj.Item(CSTR(strField)).Value = strValue
     ELSE
      SELECT CASE UCASE(strField)
       CASE "LASTNAME", "FIRSTNAME"
        'Response.Write UCASE(strField) & "<br>"
        sobj.Item(CSTR(strField)).Value = "N/A"
      END SELECT
     END IF    
   END SELECT
  NEXT
 
  'sobj.Item("FirstName").Value = "Garry"
  'sobj.Item("LastName").Value = "Lindsay"
  
  Response.Write("Creating <b> " & strFullName & "</b>, ThisAppID : <b>"& ThisAppID & "</b> record in SalesForce...<br>")  
  Response.Flush
  
  sobj.Create
  sobj.Refresh
  'p_sfdc.Create sobj, False
  
  If Err.Number <> 0 Then
   mIntError = Err.Number
   mStrError = "Error: " & Err.Number & " Source: clssForceHelper.asp : CreatesForceRecord : " & Err.Description
   Response.Write("<span class=""red_error_message_text"">"&mStrError&"</span><br>")
   Response.Flush
   bRet = FALSE
  Else
   'bRet = updateFlatFileDownloadState(dictState, dictNewFieldValues.Item("ikap_applicant_id__c"))  
   bRet = TRUE
  End If
  
  'Err.Raise vbObjectError + 93, "clssForceHelper.asp", "Error text"

  Set sobj = NOTHING

 

The problem is that this seems to be data related, i.e. it only happens when certain values are passed in for a certain record!

Any Help?

Cheers

Garry


 

Does anybody have any sample source for updating certain fields in the Lead object based on the Lead record id in VBSCRIPT

i.e. something like normal ANSI SQL

Update Lead Set Lastname = "Lindsay" Set Firstname = "Garry" Where id = 1234

Any ideas on how I use the COM object API to do this?

Cheers

Garry

Here is the code

  soql = "Select ikap_applicant_id__c from Lead Where ikap_applicant_id__c = '489852'"

  Set qrs = p_sfdc.Query(soql, False)
  
  strError = "There is no sForce field that exists with Key Field : " & strSForceKeyField
  
  If p_sfdc.Error = NO_SF_ERROR Then
   For Each sobj In qrs
    Response.Write("Deleting <b> " & strFullName & "</b>, applicantID : <b>" & applicantID & "</b> record in SalesForce...<br>")
    Response.Flush 
    
    sobj.Delete >>>>>>>>>>>>> line 362
    sobj.Refresh
    
    bRet = TRUE
   Next
  Else
   strError = "There was an error during the query operation." & vbCrLf & vbCrLf & p_sfdc.ErrorMessage
   bRet = FALSE
  End If

Here is the result

Communicating with SalesForce Web Service. This may take a 1 to 10 minutes... Please wait...

Deleting Elizabeth Jones, applicantID : 489852 record in SalesForce...

SForceOfficeToolkit.SObject.1 error '80004005'

org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.

/appsynthesis/backendmanager/includes/classes/sForce/clssForceHelper.asp, line 362

 

 Any ideas?

Cheers

Garry

Here is my debugging output :-

Insert : Field = Company | Value = qasem, muhannad
Insert : Field = LeadSource | Value = iKaptivate
Insert : Field = inq_type__c | Value = application
Insert : Field = iKap_Status__c | Value = iKaptivate Saved
Insert : Field = iKap_Last_Modified_Date__c | Value = 12/20/2004 15:35 PM
Insert : Field = iKap_Start_Date__c | Value = 12/20/2004 15:27 PM
Insert : Field = DeL_Employer__c | Value = red lobster
Insert : Field = Alternate_Phone__c | Value = 111111111
Insert : Field = PostalCode | Value = 19111
Insert : Field = City | Value = philadelphia
Insert : Field = BirthDate__c | Value = 09/18/0987
Insert : Field = Email | Value = email@cs.com
Insert : Field = SSN__c | Value = 111111111
Insert : Field = Phone | Value = 215678890
Insert : Field = FirstName | Value = muhannad
Insert : Field = Street | Value = xxxxxxxxxxxxxxxxx
Insert : Field = LastName | Value = qasem
Insert : Field = State | Value = PA
Insert : Field = Country | Value = USA
Insert : Field = Citizenship__c | Value = Yes
Insert : Field = Gender__c | Value = Male
Insert : Field = ikap_applicant_id__c | Value = 493137
Insert : Field = program__c | Value = Bachelor of Science in Computing Technology
Insert : Field = degree_level__c | Value = Undergraduate
Insert : Field = du_college__c | Value = U
Insert : Field = ikap_application_id__c | Value = 202592
Insert : Field = ikap_this_app_id__c | Value = 445045
Creating muhannad qasem, ThisAppID : 445045 record in SalesForce...
Error: -2147467259 Source: clssForceHelper.asp : CreatesForceRecord : org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
Done with muhannad qasem, ThisAppID : 445045 record in SalesForce

Here is the code that generates this output :-

Set sobj = p_sfdc.CreateObject(p_strCurrentObjectName)
  
  FOR EACH strField IN dictNewFieldValues
   strValue = dictNewFieldValues(strField)
   
   'Response.Write("Before : Field = " & strField & " | Value = " & strValue & "<br>")
     
   SELECT CASE UCASE(strField)
    CASE "APPLICATION_STARTDATE__C"
    CASE ELSE
     strValue = dictNewFieldValues(strField)
     IF LEN(strValue) > 0 Then
      Response.Write("Insert : Field = " & strField & " | Value = " & strValue & "<br>")
      sobj.Item(CSTR(strField)).Value = strValue
     ELSE
      SELECT CASE UCASE(strField)
       CASE "LASTNAME", "FIRSTNAME"
        'Response.Write UCASE(strField) & "<br>"
        sobj.Item(CSTR(strField)).Value = "N/A"
      END SELECT
     END IF    
   END SELECT
  NEXT
 
  'sobj.Item("FirstName").Value = "Garry"
  'sobj.Item("LastName").Value = "Lindsay"
  
  Response.Write("Creating <b> " & strFullName & "</b>, ThisAppID : <b>"& ThisAppID & "</b> record in SalesForce...<br>")  
  Response.Flush
  
  sobj.Create
  sobj.Refresh
  'p_sfdc.Create sobj, False
  
  If Err.Number <> 0 Then
   mIntError = Err.Number
   mStrError = "Error: " & Err.Number & " Source: clssForceHelper.asp : CreatesForceRecord : " & Err.Description
   Response.Write("<span class=""red_error_message_text"">"&mStrError&"</span><br>")
   Response.Flush
   bRet = FALSE
  Else
   'bRet = updateFlatFileDownloadState(dictState, dictNewFieldValues.Item("ikap_applicant_id__c"))  
   bRet = TRUE
  End If
  
  'Err.Raise vbObjectError + 93, "clssForceHelper.asp", "Error text"

  Set sobj = NOTHING

 

The problem is that this seems to be data related, i.e. it only happens when certain values are passed in for a certain record!

Any Help?

Cheers

Garry


 

Here is the code

  soql = "Select ikap_applicant_id__c from Lead Where ikap_applicant_id__c = '489852'"

  Set qrs = p_sfdc.Query(soql, False)
  
  strError = "There is no sForce field that exists with Key Field : " & strSForceKeyField
  
  If p_sfdc.Error = NO_SF_ERROR Then
   For Each sobj In qrs
    Response.Write("Deleting <b> " & strFullName & "</b>, applicantID : <b>" & applicantID & "</b> record in SalesForce...<br>")
    Response.Flush 
    
    sobj.Delete >>>>>>>>>>>>> line 362
    sobj.Refresh
    
    bRet = TRUE
   Next
  Else
   strError = "There was an error during the query operation." & vbCrLf & vbCrLf & p_sfdc.ErrorMessage
   bRet = FALSE
  End If

Here is the result

Communicating with SalesForce Web Service. This may take a 1 to 10 minutes... Please wait...

Deleting Elizabeth Jones, applicantID : 489852 record in SalesForce...

SForceOfficeToolkit.SObject.1 error '80004005'

org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.

/appsynthesis/backendmanager/includes/classes/sForce/clssForceHelper.asp, line 362

 

 Any ideas?

Cheers

Garry

  The Office Edition beta was updated sometime within the last month to a version which supports the 4.0 API . 

To get the new DLL registered properly, I recommend that you uninstall the previous version of Office Edition and then install the new one from the Setup menu in salesforce.com.

The new Office Edition Excel Add-in reports itself as version 1.3.1.8.
The new Toolkit DLL installs in a sub-directory of 2.0 (vs. the original 1.0).

While we may discover some glitches in the future, the sforce Excel Connector appears to function transparently with the new version.  It now provides access to new objects (such as the AccountContactRole) and it allows updates to Multi-value picklist values. 

  • September 03, 2004
  • Like
  • 0
Ron's brilliant (and now famous) bi-directional Excel add-in for updating and managing sforce data has been ported to the Office toolkit, and is now available for download at http://sforce.sf.net. Among other things, this means it now supports custom objects and Product2.

Thanks Ron!

Message Edited by adamg on 07-27-2004 09:38 AM

  • July 27, 2004
  • Like
  • 0

Will there be any documentation for SF_MSApi.dll ?

My first test code only gets this far

Dim s As SForceOfficeToolkitLib.SForceSession
Set s = New SForceOfficeToolkitLib.SForceSession

If s.Login("xxxxxx", "xxxx", False) Then
    Set rs = s.Query("select firstname, lastname from contact", False)
End If

No problems getting this far but Im using vb6 and I can't make out how to get access to the records within the result set. I thought the whole point of COM development is that the properties and methods were thesame accross plateforms. I have tried various combinations of getRecords() or records shown in other samples but everything I try throws a method not found error.

Object Browser only shows 4 properties for a queryResultSet object (EntityType,error,erromessage,tag) The entityType returns "Contact" which I expected but I can't figure out how to get from there to the othe part of the hierchy SObject that seems to contain the fields collection.

Anyone?

 

 

 

On April 12th, as part of sforce 3.0, we will be launching the sforce Toolkit for COM. The COM component wraps our current Partner API to make all of the capabilities of this Web service available to VB6 and VBA (non .NET) programs. As many of you have struggled that lack of support for Microsoft Web services for non .NET environments, this new Toolkit should greatly simplify the creation of sforce-based solutions.

Example uses include:

- Accessing sforce from VBA (Word and Excel)
- Creating ASP (not ASP.NET) web pages that call sforce
- Creating ActiveX controls and VB apps that use the Web service API

The sforce Toolkit for COM with be distributed automatically as part of an updated Office Edition, also available on 4/12. Documentation and samples will also be posted shortly thereafter.  Let us know if you have any questions in the interim.

Message Edited by adamg on 03-17-2004 02:16 PM

Message Edited by mike kreaden on 04-13-2004 08:38 AM

  • March 17, 2004
  • Like
  • 0