• SnowMore
  • NEWBIE
  • 50 Points
  • Member since 2009

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

 

The delete call has been eliminated in the Office Toolkit version 4.0.  So how am I supposed to delete, say, an opportunity? 

I get an error whenever try to retrieve or write data to/from the fields task.ReminderDateTime and task.IsReminderSet.  (I have no trouble accessing other task fields using the same code.

 

I have upgraded from Office Toolkit 3.0 to version 4.0, but this has not corrected the problem.

 

The fields and their attributes all look OK in the Apex Exlporer.

 

I have done every search I can think of and can't find Offixce Toolkit 4.0.  Can anyone tell me where I can get it?  THX

When a user has insufficient privileges to delete a record -- say, an opportunity owned by someone else -- the delete fails but there's no error message. The following code is straight out of the Office Tolkit VB code sample:

 

          On Error GoTo handleError
          Dim MyOppObject(1) As SObject3
          Set MyOppObject(0) = g_sfApi.CreateObject("opportunity")
          MyOppObject(0)("id") = MyID

          g_sfApi.Delete MyOppObject, False

 

 

But no error is triggered when the delete fails due to insufficient privileges.

 

          MsgBox MyOppObject(0).Error
          MsgBox MyOppObject(0).ErrorMessage

 

return error code 0 and an empty string for error message, regardless of whether the object was successfully deleted or not.

 

 

 

Any ideas  on how to trap this condition?

 

 

When a user has insufficient privileges to delete a record -- say, an opportunity owned by someone else -- the delete fails but there's no error message. The following code is straight out of the Office Tolkit VB code sample:

 

          On Error GoTo handleError
          Dim MyOppObject(1) As SObject3
          Set MyOppObject(0) = g_sfApi.CreateObject("opportunity")
          MyOppObject(0)("id") = MyID

          g_sfApi.Delete MyOppObject, False

 

 

But no error is triggered when the delete fails due to insufficient privileges.

 

Any ideas  on how to trap this condition?

 

I have done every search I can think of and can't find Offixce Toolkit 4.0.  Can anyone tell me where I can get it?  THX

When a user has insufficient privileges to delete a record -- say, an opportunity owned by someone else -- the delete fails but there's no error message. The following code is straight out of the Office Tolkit VB code sample:

 

          On Error GoTo handleError
          Dim MyOppObject(1) As SObject3
          Set MyOppObject(0) = g_sfApi.CreateObject("opportunity")
          MyOppObject(0)("id") = MyID

          g_sfApi.Delete MyOppObject, False

 

 

But no error is triggered when the delete fails due to insufficient privileges.

 

          MsgBox MyOppObject(0).Error
          MsgBox MyOppObject(0).ErrorMessage

 

return error code 0 and an empty string for error message, regardless of whether the object was successfully deleted or not.

 

 

 

Any ideas  on how to trap this condition?

 

 

When a user has insufficient privileges to delete a record -- say, an opportunity owned by someone else -- the delete fails but there's no error message. The following code is straight out of the Office Tolkit VB code sample:

 

          On Error GoTo handleError
          Dim MyOppObject(1) As SObject3
          Set MyOppObject(0) = g_sfApi.CreateObject("opportunity")
          MyOppObject(0)("id") = MyID

          g_sfApi.Delete MyOppObject, False

 

 

But no error is triggered when the delete fails due to insufficient privileges.

 

Any ideas  on how to trap this condition?

Is it possible to create queries in MS Access 2007 that will pull data from SalesForce.com??

Details would be helpful,

Thanks,

Oleg.
Hi,

I am currently writing an Excel macro that does, for example the following query:

select Id, Owned_by__c, Owned_by__r.FirstName from Vehicle__c where Owned_by__r.IsPersonAccount=true

Vehicle__c is a custom object with a lookup relationship to Account. We have Person Accounts enabled.

In the resulting QueryResultSet3 object, I can access all fields from the Vehicle__c object, but not those from the related Account object I asked for in the query (e.g. Owned_by__r.FirstName).

Can anyone point me in the right direction on this one?

Thanks in advance,

T.
I am trying to create tasks through the webservice API. I have code that looks something like this:

List<sObject> objs = new List<sObject>;
foreach ... {
  Task task = new Task();
  task.AccountId = accountID;
  task.WhatId = opportunityID;
  task.Subject = subject;
  task.Description = description;
  task.ActivityDate = date;
  task.IsClosed = isComplete;
  task.Priority = "Normal";
  task.Status = (isComplete) ? "Completed" : "In Progress";
  objs.Add(task);
}

sObject[] objArray = objs.ToArray();
SaveResult[] resArray = new SaveResult[objs.Count];
DebuggingInfo debInfo = binding.create(sessionHeader, new AssignmentRuleHeader(), new MruHeader(), new DebuggingHeader(), new EmailHeader(), objArray, out resArray);


The accountIds and opportunityIds were retrieved earlier in the code through the API. I have confirmed that they are valid IDs, referring to the correct accounts and opportunities that already exist in the DB.

For each task that I try to inset, I receive the following error message:
Error code is: INVALID_FIELD_FOR_INSERT_UPDATE
Error message: Unable to create/update fields: AccountId. Please check the security settings of this field and verify that it is read/write for your profile.
The error code and message seem to imply that I cannot create a task with an accountId. This seems strange, as I want to relate the task to the accountId.

Any idea on what the error message means, and how I can fix this so that I can insert tasks into the DB through the API? (And regarding the instruction to check the security settings of this field, etc, I have done some poking around in my account and I could not find where to do this, if this would indeed solve my problem).

Thanks!


Message Edited by yaakov on 03-04-2008 11:26 PM
  • March 05, 2008
  • Like
  • 0
I seem to be unable to find a solution to this error. These field names exist in my enterprise wsdl, though if I try to set them, the creat call fails with that error message.

Any advice?

Here is my function:

    private void createTheFollowUpEvent()
    {
        //Create an event object to send to the service
        Task myTask = new Task();
        //Set several properties
        myTask.WhatId = opportunityID;
        myTask.WhoId = ContactID;
        myTask.IsReminderSet = false;
        myTask.ActivityDate = cldCloseDate.TodaysDate.ToUniversalTime();
        myTask.Description = txtCallSubject.Text;
        myTask.Subject = "Follow up call";
        myTask.OwnerId = userId;
        myTask.Status = "Completed";

       
        // Add the account to an array of SObjects
        sObject[] records = new sObject[] { myTask };
        // Invoke the create call, passing in the account properties
        // and saving the results in a SaveResult object
        SaveResult[] saveResults = binding.create(records);
        // Access the new ID
        String newID = saveResults[0].id;

       
    }
    private void createAnotherEvent()
    {
        //Create an event object to send to the service
        Task myTask = new Task();
        //Set the properties
        myTask.WhatId = opportunityID;
        myTask.WhoId = ContactID;
        myTask.IsReminderSetSpecified = true;
        myTask.IsReminderSet = true;
        myTask.ReminderDateTimeSpecified = true;
        myTask.ReminderDateTime = cldFollowUpDate.SelectedDate.ToUniversalTime();
        myTask.ActivityDate = cldFollowUpDate.SelectedDate.ToUniversalTime();
        myTask.ActivityDateSpecified = true;
        myTask.Description = txtTaskSubject.Text;
        myTask.Subject = "Follow Up on " + quoteNumber;
        myTask.OwnerId = ownerID;
        myTask.Status = "Not Started";


        // Add the account to an array of SObjects
        sObject[] records = new sObject[] { myTask };
        // Invoke the create call, passing in the account properties
        // and saving the results in a SaveResult object
        SaveResult[] saveResults = binding.create(records);
        // Access the new ID
        String newID = saveResults[0].id;

    }
  • October 26, 2007
  • Like
  • 0