Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Using the SOjbect Id of an existing Lead to set a new field value. If there is an active connection to Salesforce, then it will also be populated in Salesforce, otherwise Leads should be configured for synchronization.

Code Block
languagec#
Id leadId = new Id("00Q2800000fgxkKEAQ");
Lead lead = new Lead(leadId);

lead.LastName = "Smith";

GenericMongoService service = new GenericMongoService(Lead.SFType);

SaveResult saveResult = service.UpdateEntity(lead);

if (saveResult.success)
{
    Assert.AreEqual(leadId, (Id)saveResult.id);
}

...