Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't want to update all fields on the object (Lead/Contact) I am updating, is there any way to avoid that?

I am trying to avoid having to pull all the fields from Salesforce just to update them again.

share|improve this question
up vote 1 down vote accepted

One option would be to create new objects with just the fields you want to update. You could either use strongly typed POCO or annonymous types.

E.g.

// annonymous types
var success = await client.UpdateAsync("Lead", lead.Id, new { Name = "Test Update" });
share|improve this answer
1  
I used dynamic c = new ExpandoObject(); but same principle. – Dale Burrell Mar 9 at 23:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.