Bill,
What component are you using to ‘open’ the URL? Is it a Button or Template? If so, you should make sure that the component references your Model.
If it is a Template ‘field’ or a component that references a different model from the one you are getting your LastestPublishedVersionId from, then you may need to use the model in the merge syntax. Something like…