• gorky2
  • NEWBIE
  • 5 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies

It seems I have followed the instructions I found in the forum, but sforce returns me an error when I call the update method. My code is this one:

'begin code

Set SforceApi = server.CreateObject("SForceOfficeToolkit.SForceSession")

if SforceApi.Login(login,password,false) then

             strSQL="Select AccountNumber, Description, Id, Name from Account where Id='fakedid'"

             set queryResults = SforceApi.Query(strSQL, False)

             for each sobj in queryResults

                sobj.Item("Description").Value = "testing"

                Response.Write sobj.Item("Id").Value &","&sobj.Item("Name").Value &","&sobj.Item("AccountNumber").Value &","& sobj.Item("Description").Value

               SforceApi.Update queryResults,false      'here fails

            next

end if

'end code

the error I get is this one:

               error '800706be'

it works properly, retrieving a record, accessing its properties, changing them (in memory) but fails when I try to upload that record on salesforce.

 

Can anyone help me?

 

thanx

  • January 20, 2006
  • Like
  • 0

Hi!

I'm trying to create a task using the SForceOfficeToolkit object using the createobject function to create a task and then assign the values that i want for this new task and use the object create to "make a task" in SF

But i have a problem the field "accountid" from task table is not updatable I can not assign a value.

There is a way using this object to create a task assigned to an accountid?

 

This is an example that how i'm trying to create a task with Asp (non.net)

Dim SforceApi
Dim sobject (0)
Dim fld

Set SforceApi = server.CreateObject("SForceOfficeToolkit.SForceSession")
 
 if SforceApi.Login("mylogin","mypass",false) then
  
  Set sobject = SforceApi.CreateObject("task")
  
  For Each fld In sobject.fields
   

    if fld.name = "AccountId" then

    If (fld.Createable) Then 'this is always false and i can not assign a value to the accountid field

      fld.value="001600000018C8OBBU"

    end if

    end if


   if fld.name = "Description" then
    If (fld.Createable) Then
     fld.value="Prova de insert"
    end if
   end if
   if fld.name = "Subject" then
    If (fld.Createable) Then
     fld.value="testejant insertar dades"
    end if
   end if
   
 next
  
  
  if SforceApi.Create(sobject,false) then
   Response.Write "Correct insert " & "<BR>"
  else
   Response.Write "Error on insert" & "<BR>"  
  end if
 end if

Set SforceApi = nothing
set sobject(0) = nothing

If anyone find a way to do this with the SForceOfficeToolkit object

 

cheers

gorky2

Hi!

I'm using the SForceOfficeToolkit.SForceSession

To integrate SalesForce with our Asp aplication.

I don't have problem to query data,

But now I want to insert data in SalesForce.

I think that i must to use the Create function that we have with this SForceOfficeToolkit.SForceSession but when i saw c# o Java examples because they can import the wsdl file the have the object account,task ... etc

How i Can made for example the "object Account" with ASP(non Net)?

Anyone have any sample?

faithfully,

 

Hi I need to integrate salesforce on a frame of a frameset and i want to show salesforce opened directly into an account.

My asp that generates this url from and inputs of (contact email or Company Name) works ok alone ... i open this Asp into a browser works "perfectly"  But when I call this Asp from a Frame of a Frameset i have the page of salesforce that my login and password are worng ...

I made a simple example on HTML to simulate to open salesForce intro a frame:






 
 
http://emea.salesforce.com/secur/frontdoor.jsp?sid=_4znl5bFVCU3XI_XggRTteaH1xyGi1&retURL=https://emea.salesforce.com/001800000016CATAA2" name="salesF">




This does not work  WHY?

If I copy and paste the URL generated into a browser it works perfectly.

Anyone have a clue because i have this problem?

I don't understand what can happen.

 

Message Edited by gorky2 on 05-04-2005 10:37 AM

Message Edited by DevAngel on 05-04-2005 02:33 PM

Hi!

I try to login with sforce explorer with my develop account and de program "crashes"

the only thing that i change is the endpoint

for my personal salesforce account i use:

https://eu0-api.salesforce.com/services/Soap/u/5.0    (it works ok!)

 

for my developer account I use:

https://na1-api.salesforce.com/services/Soap/c/4.0   (it crashes)

 

I have to configure diferent?

It's not possible to use the develop account with sforce explorer?

 

  • April 27, 2005
  • Like
  • 0

Hi!

I'm trying to create a task using the SForceOfficeToolkit object using the createobject function to create a task and then assign the values that i want for this new task and use the object create to "make a task" in SF

But i have a problem the field "accountid" from task table is not updatable I can not assign a value.

There is a way using this object to create a task assigned to an accountid?

 

This is an example that how i'm trying to create a task with Asp (non.net)

Dim SforceApi
Dim sobject (0)
Dim fld

Set SforceApi = server.CreateObject("SForceOfficeToolkit.SForceSession")
 
 if SforceApi.Login("mylogin","mypass",false) then
  
  Set sobject = SforceApi.CreateObject("task")
  
  For Each fld In sobject.fields
   

    if fld.name = "AccountId" then

    If (fld.Createable) Then 'this is always false and i can not assign a value to the accountid field

      fld.value="001600000018C8OBBU"

    end if

    end if


   if fld.name = "Description" then
    If (fld.Createable) Then
     fld.value="Prova de insert"
    end if
   end if
   if fld.name = "Subject" then
    If (fld.Createable) Then
     fld.value="testejant insertar dades"
    end if
   end if
   
 next
  
  
  if SforceApi.Create(sobject,false) then
   Response.Write "Correct insert " & "<BR>"
  else
   Response.Write "Error on insert" & "<BR>"  
  end if
 end if

Set SforceApi = nothing
set sobject(0) = nothing

If anyone find a way to do this with the SForceOfficeToolkit object

 

cheers

gorky2

Hi!

I'm using the SForceOfficeToolkit.SForceSession

To integrate SalesForce with our Asp aplication.

I don't have problem to query data,

But now I want to insert data in SalesForce.

I think that i must to use the Create function that we have with this SForceOfficeToolkit.SForceSession but when i saw c# o Java examples because they can import the wsdl file the have the object account,task ... etc

How i Can made for example the "object Account" with ASP(non Net)?

Anyone have any sample?

faithfully,

 

Hi I need to integrate salesforce on a frame of a frameset and i want to show salesforce opened directly into an account.

My asp that generates this url from and inputs of (contact email or Company Name) works ok alone ... i open this Asp into a browser works "perfectly"  But when I call this Asp from a Frame of a Frameset i have the page of salesforce that my login and password are worng ...

I made a simple example on HTML to simulate to open salesForce intro a frame:






 
 
http://emea.salesforce.com/secur/frontdoor.jsp?sid=_4znl5bFVCU3XI_XggRTteaH1xyGi1&retURL=https://emea.salesforce.com/001800000016CATAA2" name="salesF">




This does not work  WHY?

If I copy and paste the URL generated into a browser it works perfectly.

Anyone have a clue because i have this problem?

I don't understand what can happen.

 

Message Edited by gorky2 on 05-04-2005 10:37 AM

Message Edited by DevAngel on 05-04-2005 02:33 PM