function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DominoDomino 

Task: bad field names on insert/update call: IsReminderSet, ReminderDateTime

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;

    }
SuperfellSuperfell
You're probably accessing an older API version at runtime, than the one defined in your WSDL. I'd check your serverUrl's.
DominoDomino
Are you reffering to the binding.url that is returned when I set the session header?

(https://na4.salesforce.com/services/Soap/c/3.0)

If I'm off track here, can you point me in the direction of understanding serverURLs.

If it helps any, my application is based on a custom link that passes the session id of a user, among other things, and uses that session to communicate with the API.
SuperfellSuperfell
Yes, so you're using the merge field for the 3.0 API, but trying to use fields that are only available in a much higher version. You'll need to update the merge field you're using to be the same version as the WSDL you're building against.
DominoDomino
Thank you Simon.

All I had to do was change URL that was passed in the custom link to the newer version.


SnowMoreSnowMore

I'm having this problem as well -- getting an error when I try to access the field ReminderDateTime.  I don't understand the answer, however.  It seems I'm supposed to set a server URL, but how do I don't see anything in the documentation that tells me how to do that.

 

Currently, I'm logging in using this very simple code to log in:

 

     g_sfApi.LogIn(MySFUserName, MySFPassword & MySecurityToken)

 

Can you please tell me how to set the server URL, and what I need to set it to?

 

 

SuperfellSuperfell
Looks like you're using the office toolkit, have you tried the 4.0 office toolkit release? (you should probably ask any further questions on the vb/office board, where the officetoolkit folks hang out)
SnowMoreSnowMore

 

Yes, I am using the Office Toolkit 3.  Can you please point me to where I can download 4.0?