Custom DocType - Naming does not follow the Naming Settings

As a complete ERPnext newbee I’ve managed to have it running on our own host. I’ve also managed to add some extra Custom DocTypes that will be needed for my (future) implementation. On the other hand, I’ve encountered some strange behavior in the naming of Child Tables when I have them in such a Custom DocType - or at least I don’t actually understand what’s happening.

I have added a new Custom DocType called Project Information and connected it to the Project DocType. This functionality works. So, from Connections I can add an extra page to a Project with the fields showing as expected.

When I save that document, the Name of the document becomes a random ‘number’ like * 05dda214c4* or something different generated by the system, and not, as what I expected what I’ve entered in the auto naming-field of that DocType.

In my case I wanted to use PI-{project_name}-.#####

  • PI for Project Information
  • {project_name} - the project name of the project that has this page connected to
    *.##### (optional) as I do need one single connected page for each Project, but if somebody adds a second one the system won’t return an error… (Personal note/future to do: I have to figure out how to allow just one single page connected to each project)

I have the same issue going on with some Child Tables that I’ve created to be used in this new ‘Project Info’ page. These seem to work, but only when I have nothing in the Auto Naming Field. As soon as I have a sequence there these Child Tables seem to break the links that worked prior to the addition of the Auto Naming rule.

Crawling around trough this forum on the outlook for a solution, I think I do understand that the Naming of a page is handled in the core of the system and not on the interface itself. It has naming sequences involved and I presume the naming sequence for a newly made DocType needs to be added in the code. I can’t find some in depth info regarding this particular issue right away, and as I’m completely new here I just wanted to make sure that I won’t be messing up stuff that I don’t want to be messed-up.

Any help would be appreciated!

[SOLVED] - Really Newbee issue here… I’ve found the solution. The naming field should have the complete line like this:

format:PI-{project}-{#####}

like described in the Naming Options - so including (in my case) ‘format:’

1 Like