Hey Johan,
I recently had a situation like this and here's what I did.
1.) Double checked the HTML Snippet I was using to make sure it was the HTML Snippet w/ Context
2.) Add a debugger in the HTML Snippet and also add a "var context = this" and see what Mendix Object you're getting
3.) Explore the MxObject methods, I'm sure there's a function to retrieve the guids of an entity once you have retrieved the pointer from the data view.
That should help get you started in the right direction.
-Sam