"Create New" option in website generators

I have created a doctype using website generators, what I want is to add an option of create new on that doctype, for that how can I change the html? or what should i return in context to enable it?

@Khadija

You have created the new doctype named “Company Documents” and you’re worried that it has no option for creating a new document in it currently.

Give appropriate permission rules for the new doctype i.e Read, Write, Create, Delete

If you’re not finding it, try running following command in frappe-bench

bench build && bench restart

I hope you find this useful.

Actually I can create new documents from the desk but I want to add an option on its web view that from there I create a new document.
I know that we can use web form to add new records in doctype but is there a way to add an option to that webform path on the doctype web view?

I didn’t quite get your response. Can you please elaborate and give use case regarding your view.

when we create a new doctype we can access their list from webpage for example if doctype name is ‘Company Documents’ the webpage route is /company_documents. This is where we see list of records of that doctype.
What I want to do is add a new record in doctype from that list view page. Is that possible to add a new button on this list view which takes me to a form where I can add a new record?

You’re talking about the New Button, right?
By clicking on New, it will open a document for the data to be entered in the form.
This can be availed in custom doctype too. After creation ensure permissions are given to that doctype and try running bench build and restart. The custom doctype will get affected and it will have the same option as a built-in doctype.
@Khadija

do you know the difference between web view and desk view of erpnext?

Sorry, I’m not aware about it. I think they both are the same. Desk View as in the home page which has all the icons listed on the web page.
Can you post a screenshot by explaining the same?

By referring to the current version of erpnext, I’ve got to know about the web view. See on Website Link right?

Got your question now. Sorry for the misunderstanding! :sweat_smile: @Khadija

Yes, if you see there is no option to create a new record web view that’s what I was asking