You need to sign in to do that
Don't have an account?
Having Trouble setting picklist field for a new Task
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!
Hi Simon,
thank for replying. It seems as tho' I am an idiot :smileyhappy:
I was not paying attention to who the leads/contacts were being assigned to. It looks like its working properly.
All Answers
Just wanted to add that none of the other fields are setting except the whoid.
The code is simple enough, need some direction as to why none of the other fields
are not being set.
There are no validation rules.
Hi Simon,
thank for replying. It seems as tho' I am an idiot :smileyhappy:
I was not paying attention to who the leads/contacts were being assigned to. It looks like its working properly.