Datatable inline edit error- Cannot read property 'replace' of undefined
Datatable inline edit error- Cannot read property 'replace' of undefined
bikram.b@bitordertech.com
Posts: 7Questions: 2Answers: 0
Hi All,
I am getting this error 'Cannot read property 'replace' of undefined', when I try to edit a cell and change the content and hit 'enter'.I am following this basic example.https://editor.datatables.net/examples/inline-editing/simple
This discussion has been closed.
Answers
Can you give me a link to your page showing the issue so I can try to debug the problem please? I assume that the link you give works okay for you, so we would need to identify the difference between the two pages.
Thanks,
Allan
Here is the code. please check.
html-
script-
Can you confirm if the link you gave at the top works for you please?
I don't immediately see the issue with that code, I would need to see the page to be able to debug it, per our PM discussion.
Allan,
The link works for me but not functioning fully. I mean onclick of the cell the cell content shows in edit mode,but after changing the value and hitting 'enter' it shows up the error-
'Cannot read property 'replace' of undefined'.
My example is showing the 'Cannot read property 'replace' of undefined' error?
What browser and OS are you using please?
Allan
I tested in-
1- Chrome, Mac
2-Chrome,Windows8
Thanks
Thanks. Could you possibly also answer my first question:
I've added the "is" for clarity.
Allan
Yes I am following the example. And it is showing the above error.
Thanks
I'm asking if the error occurs for you when you are using that page. Not if it occurs on your own page, which we have already established.
Basically, I currently have no way to reproduce the error, and therefore can't debug it. If the error can be reproduced on the page I linked to I need to know how to do it. I currently get no error on that page.
Allan
Hello Allan,
Thank you very much for responding.
The above link works perfectly fine for me. Im able to perform inline edit and save upon hitting enter. So you may not able to reproduce it there.
We have included the trail version in our salesforce org(credentails shared in personal chat already) and are able to invoke inline edit on a cell. However upon hitting enter, we get the "'Cannot read property 'replace' of undefined' error" script error.
We download the "JS+CSS only" library from trail page. Are we missing anything here. I went through the documentation and couldn't find whats missing in our integrated page.
Can you please login to salesforce org and verify the pages link shared below.
View Page : https://c.ap2.visual.force.com/apex/showAccounts
Page Source : https://ap2.salesforce.com/09928000000DqaA
Thanks - I've managed to log in this time and can see the issue.
The problem is that the JSON response from the server is not in the format that Editor requires.
Are you able to send back data in the JSON structure that Editor requires?
Allan