WebAPIToolkit.Web.Update - AlexanderStruck/WebAPIToolkit GitHub Wiki

Method:

WebAPIToolkit.Web.Update(entityName, id, jsonObject, callback)

Description:

Updates a record

Parameters:

  • entityName(string): Logicalname of the entity
  • id(GUID): ID of the record
  • jsonObject(object): JSON-object with the data
  • callback(function): Callback-method if async

Result:

Sample:

var UpdateAccount = new WebAPIToolkit.BusinessEntity(entityName, ID);
UpdateAccount.SetLookup("primarycontactid", null);
UpdateAccount.SetCurrency("revenue", 123456);
UpdateAccount.SetCurrency("creditonhold", null);
UpdateAccount.SetCurrency("description", "#NEW DESCRIPTION");
UpdateAccount.Update();