create an account record in Dynamics 365 using JavaScript

var accountData = {
    name: "Sample Accounte",
    accountnumber: "123456",
    address1_city: "Seattlee",
    address1_stateorprovince: "WAw",
    // Add any other desired fields and values
  };
  Xrm.WebApi.createRecord("account", accountData).then(
    function success(result) {
      console.log("Account created successfully. Account ID: " + result.id);
    },
    function error(error) {
      console.log("Error creating account: " + error.message);
    }
  );

Comments

Popular posts from this blog

Power Automate - Update Child record when parent record is updated by using power automate in MS Dynamics CRM

set the active stage in Dynamics 365 when the option set value is "yes"