You need to sign in to do that
Don't have an account?

vbscript - sforcetoolkit - update a custom object help
I am trying to update a custom object after I have already queried it but receive the error 'object required' on my web page. The error points to the line of code: sobj.item("Id").value = "a0440000006d1DM"
I saw some information on the discussion boards related to updates in VBA but cannot get this to work in vbscript. What I have missed?
set binding = CreateObject("SForceOfficeToolkit.SForceSession")
binding.SessionId = sSessionId
binding.SetServerUrl(sServerUrl)
binding.SessionId = sSessionId
binding.SetServerUrl(sServerUrl)
set sobj = binding.CreateObject("WEFSN__c")
sobj.Item("Id").value = "a0440000006d1DM"
sobj.Item("Item_Number__c").value = "MIKE"
sobj.Update
sobj.Item("Id").value = "a0440000006d1DM"
sobj.Item("Item_Number__c").value = "MIKE"
sobj.Update
Thanks.
Mike Schumacher
there is some VB code inside the Excel Connector that you can look at for examples of creating new records using the office toolkit.
so ,
set sobj = binding.CreateEntity("WEFSN__c")
will create an sobject that you can populate
getting the object from the server, then doing the update is safe.