Versions Compared

Key

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

Any entity can be queried via the GenericEntity class without having to define a strongly-typed schema.

Create a new lead

Code Block
languagec#
var session = serviceFactory.GetSessionFromConnectionString("MyDynamicsInstance");
// Field values are set with Dictionary<string, object>.
var fieldValues = new Dictionary<string, object>() {
  { "firstname", "John" },
  { "lastname", "Smith" },
  { "emailaddress1", "example@example.com" }
};
var lead = await GenericEntity.InsertAsync(session, "lead", fieldValues);

...