Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

303
Vistas
Create an Entity Record using "Xrm.WebApi.createRecord" in JS- Dynamics 365

I was trying to create an entity record using Xrm.WebApi.CreateRecord but I'm getting the following error.

"cannot find record to be updated"

please note that the field 'edm_donorid' exists in the form and the ID that I'm using to fill the fill also exists in the contacts.

var entity = {};
var type = result["_edm_donorid_value@Microsoft.Dynamics.CRM.associatednavigationproperty"];

if (type == "edm_DonorID_contact") {
    entity["edm_DonorID_contact@odata.bind"] = "/contacts(" + result["_edm_donorid_value"] + ")";
}
else if (type == "edm_DonorID_account") {
    entity["edm_DonorID_account@odata.bind"] = "/accounts(" + result["_edm_donorid_value"] + ")";
}

opener.Xrm.WebApi.createRecord("edm_bookreceiptdetail", entity)
    .then(function success(record) {
        console.log("record created with ID: " + record.id);
        // perform operations on record creation
    },
        function (error) {
            console.log(error.message);
            // handle error conditions
        }
    );
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I found the problem and I fixed it.

"cannot find record to be updated" error comes when I disregarded filling fields that have a relation with another entity.

so, make sure to fill every mandatory field or fields related to any other entities when you create an entity record using JS.

Amer Azzam, Microsoft Dynamics 365 Developer

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda