Skip to content

v2.1.3

Compare
Choose a tag to compare
@AleksandrRogov AleksandrRogov released this 11 Apr 02:58

Changes:

  • Added support for composable functions. Request object in callFunction now accepts select and filter parameters. #168
  • ContentId can be used as an URI reference inside the Batch Request. For example:
dynamicsWebApi.startBatch();

dynamicsWebApi.create({
  contentId: "1", //<-- this content id will be used in the next request
  collection: "contacts",
  data: {
    firstname: "James",
    lastname: "Doe"
  }
});

dynamicsWebApi.updateSingleProperty({
  contentId: "$1", //<-- using content id of the record created in a previous request
  // note, that neither "collection" nor "key" is used in this request, 
  // contentId replaces those
  fieldValuePair: { lastname: "Bond" }
});

const results = await dynamicsWebApi.executeBatch();
//results[0] will have an id of a contact record
//results[1] will be empty

Deprecations:

  • functionName parameter in callFunction is marked as deprecated and will be removed in one of the future versions. Please use name instead.