New document name/url

When I use a button to create a new document, it gets the name that I specify, plus… a couple more random characters. This kind of handy when duplicate names are used, so you can have a couple of pages with the same page name. However, it is not very handy if I want to make an (automatic) note of the new page url. I can create the URL within the same action - up to the last added random characters. Do we really need these extra characters if we are making unique pages?
If there is no way to retrieve the new URL with code, I would prefer a URL that is made up of the document url and the page name without the additional characters.

Perhaps I am overlooking something obvious, if so, please advice.

Greetings,
Joost