Step one is making the page that you want to share to actually have its own url. For that step you can use the page-property ‘url’. And if you want that page to be object-specific, add /{Id}
Step two is adding that url to the information you pass along. To do so add a share button on your page (if object specific, then inside a dataview containing that object). Maybe have a peek at https://appstore.home.mendix.com/link/app/421/ if it serves your purpose.
Editted:
See this docs page for a complete description of the url-property.
The first is is most easily solved by only typing in the url-property:
Id
and then enter. It will fill the property with
/Id/{Id}
A little disappointing IMHO is the fact that Id represents the Mendix’ object-id. Which means that that id will get exposed to the client. No big problem though.
The second error message you describe is because if a page contains a dataview as main element, then you need to add /{Id}. If you don’t want your url to be object-specific, then add a datagrid as main element