Hello,
I just installed Frappe and ERPNext version 15 for checking new features. But I cannot create new doctype in my custom app. On save, shows this error in brwser console
What is the issue here, I cannot get it. Can anyone here have any idea?
Frappe team working on it
1 Like
Peer
October 27, 2023, 4:37pm
3
The issue on github was:
opened 10:20AM - 21 Oct 23 UTC
closed 08:44AM - 23 Oct 23 UTC
bug
critical
I am trying to create new doctype but it gives error like `form.js:798 TypeError… : Cannot read properties of undefined (reading 'undefined')`
[frappesave error.webm](https://github.com/frappe/frappe/assets/78611909/ea7ab6b3-370a-475c-bf8f-7759df5b3364)
I am using node version 18 and frappe version 15

and it is solved by this pull request:
frappe:develop
← ankush:form_builder_data
opened 01:36PM - 22 Oct 23 UTC
Problem:
frm.save fails with mandatory error because form builder is modifying … `df.name` of newly created docfields. DFs are located by `locals.doctype.docname` and if you change the name it's orphaned.
This was working so far only because we follow this naming: `new-doctype-#` so it would pick up any arbitrary document and move on.
---
Alternate solution: Since form builder was directly updating `doc.fields` changes were not reflected in underlying model. doing `frm.set_value` prevent this out-of-sync model problems.
closes https://github.com/frappe/frappe/issues/22851
closes https://github.com/frappe/frappe/issues/22723
1 Like