James, i managed to get it working!
Thanks for all your help.
I’ve got one additional question though, it’s relationship field related:
Would it be possible (and if yes how) to create an admin column for the relationship field? So the relationship will be visible on my custom post type overview page?