initCreate giving Uncaught Unknown field name

initCreate giving Uncaught Unknown field name

muhammadwajidmuhammadwajid Posts: 2Questions: 1Answers: 0
edited April 2023 in Free community support

I am simply trying to add record in a table konstruksjoner

Uncaught Unknown field name - konstruksjoner.eiendomid

I have added field to editor fields.

{
"label": "eiendomid:",
"name": "konstruksjoner.eiendomid",
"type":"hidden"
}

while trying to add new record I tried with code

editor.on('initCreate',  function() {  
 editor.set('konstruksjoner.eiendomid', eiendomid1);
});

but Its giving me error Uncaught Unknown field name - konstruksjoner.eiendomid

Is there anything I am missing?

Answers

  • allanallan Posts: 61,796Questions: 1Answers: 10,115 Site admin

    There is nothing there that would cause the error you are seeing. Can you give me a link to the page showing the issue so I can take a look into it further please?

    Allan

  • muhammadwajidmuhammadwajid Posts: 2Questions: 1Answers: 0

    Thank you allan for response..
    Sorry I cannot give you page link or access because It's for authorized users only..

    Uncaught Unknown field name - konstruksjoner.eiendomid dataTables.editor.min.js:49:315
        field https://websiteurl.com/dtab/js/dataTables.editor.min.js:49
    

    same error was being thrown in my another code so I tried document.getElementById with settimeout and it worked.

    setTimeout(function() {
                   document.getElementById('DTE_Field_aktiviteter-eiendomid').value = eiendomid;
                    document.getElementById('DTE_Field_aktiviteter-kundenr').value = compid1;
                   // editor.set("aktiviteter.eiendomid", eiendomid);
                   // editor.set("aktiviteter.kundenr", compid1);
                  //your code to be executed after 1 second
                }, delayInMilliseconds);
    

    but In this scenario every field I am trying to set inside initCreate is giving Unknown field error..

  • allanallan Posts: 61,796Questions: 1Answers: 10,115 Site admin

    Can you create a test case showing the issue that I can see? All I can really guess at the moment is that something is removing the field.

    Allan

Sign In or Register to comment.