Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

306
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda