You need to sign in to do that
Don't have an account?
Strange Error when Trying to Create Task
Dim sForceService As New sforce.SforceService
sForceService.Url = mSessionURL
sForceService.SessionHeaderValue = New sforce.SessionHeader
sForceService.SessionHeaderValue.sessionId = mSessionID
Dim taskArray(0) As sforce.sObject
Dim sTask As sforce.Task = New sforce.Task
sTask.CreatedById = mUserID
sTask.OwnerId = mRecipientID
sTask.ActivityDate = DateTime.Now
sTask.Description = "Test Description"
sTask.Priority = "Normal"
sTask.Status = "Completed"
sTask.Subject = "Email: Test Email"
taskArray(0) = sTask
Dim sr() As sforce.SaveResult = sForceService.create(taskArray)
When I try to run the code in Visual Studio's Debug mode, everything seems to work fine until it gets to the very last line above; when the Dim sr() As sforce.SaveResult = sForceService.create(taskArray) code executes, I get the following error: "Unable to automatically step into the server. Connecting to the server machine "na2-api.salesforce.com" failed. The format of the specified network name is invalid."
I've tried researching this error and verifying that what I'm trying to do is valid, but I can't find any answers. Has anyone tried creating their own task objects before? Note that I'm presuming that the same SalesForce server is used to create new objects as well as read existing company data. All help is appreciated.
Siddharth,
Thanks for your input. I did get this to work (and yes, I was missing WhoID along with a few other parameters). But the error keeps appearing--I've learned to just ignore it when debugging my app.