• KM_QuantumColor
  • NEWBIE
  • 25 Points
  • Member since 2009

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

Hello,

 

NewB here.

 

I am having troubling setting the fields for anytime I create a new Task or event.

 

Using C#

 

 basic syntax...

 

 

            Task sfTask = new Task();
 
            sfTask.Description = "description";
            sfTask.WhoId = whoID;
            sfTask.Subject = "Call";
            sfTask.Status = "In Progress";

            sfTask.Priority = "low";
            sObject taskSObject = new sObject();
            taskSObject = (sObject)sfTask;
            sObject[] eventArray = new sObject[1];
            eventArray[0] = taskSObject;
            SaveResult[] sr = _binding.create(eventArray);

            for (int j = 0; j < sr.Length; j++)
            {
                if (sr[j].success)
                {
                    sr[j].id.ToString();
                }
                else
                {
                    for (int i = 0; i < sr[j].errors.Length; i++)
                    {
                        Error err = sr[j].errors[i];
                    }
                }
            }

 

What's strange is, it inserts into the table OK, but for whatever reason it is ignoring the 

 

assignments for 'status' and 'subject', yet sets the 'whoid' correctly.

What am I doing wrong?

 

Thanks!

Message Edited by KM_QuantumColor on 05-12-2009 02:58 PM
Message Edited by KM_QuantumColor on 05-12-2009 02:59 PM

Hi,

 

just wanted to tell that we've just published a Salesforce integration project for .NET on Google Code.

It is considered ver 0.1 and you're free to download and test in your projects.

 

It's quite simple to use:

 

protected void btnSearchAccount_Click(object sender, EventArgs e) { Account account = new AccountController().GetByName(txtAccountSearch.Text); lblAccountResult.Text = account != null ? account.Name : "No result"; }

 

This is just a beginning of something that can grow. If you want to join the development, please let me know.

 

http://code.google.com/p/salesforce-dotnet/

 

Best regards

Stian 

 

Hello,

 

NewB here.

 

I am having troubling setting the fields for anytime I create a new Task or event.

 

Using C#

 

 basic syntax...

 

 

            Task sfTask = new Task();
 
            sfTask.Description = "description";
            sfTask.WhoId = whoID;
            sfTask.Subject = "Call";
            sfTask.Status = "In Progress";

            sfTask.Priority = "low";
            sObject taskSObject = new sObject();
            taskSObject = (sObject)sfTask;
            sObject[] eventArray = new sObject[1];
            eventArray[0] = taskSObject;
            SaveResult[] sr = _binding.create(eventArray);

            for (int j = 0; j < sr.Length; j++)
            {
                if (sr[j].success)
                {
                    sr[j].id.ToString();
                }
                else
                {
                    for (int i = 0; i < sr[j].errors.Length; i++)
                    {
                        Error err = sr[j].errors[i];
                    }
                }
            }

 

What's strange is, it inserts into the table OK, but for whatever reason it is ignoring the 

 

assignments for 'status' and 'subject', yet sets the 'whoid' correctly.

What am I doing wrong?

 

Thanks!

Message Edited by KM_QuantumColor on 05-12-2009 02:58 PM
Message Edited by KM_QuantumColor on 05-12-2009 02:59 PM

I am very new to development in SalesForce.  

 

There is a standard field on account called Last Activity which says the date of the last activity.  I would like to know what type of activity the last activity was (email, call, voicemail, etc).

 

Can anyone give me some pointers on how to begin developing to create this new field?

 

All help is very much appreciated.