The problem you are presenting is something similar to what I just recently encountered in one of my projects. Like mentioned by others
You can't create a master-detail or lookup relationship to Activities (Tasks/Events) object.
Solution I implemented was, I created a text (length 18) field that I populated using the apex with the EventId. Two points to note in this solutions:
- This solution works via apex/trigger; not from the UI. So, if you are looking to present this to your end-users, it won't make much use. My use case was to update the object when some other process runs, so it perfectly fulfilled my need; and I'm not showing it to the end-user, even though it is useful in related processes. But the end-users need not to know everything.
- If you want to show the end-users what event is attached to your custom object, you could create another text field with read-only access and fill it with the event name.
P.S. Above solution may or may not work as is in your situation, so you might need to tweak it as per your needs; and also, you need to understand that any changes in Event name, etc won't have an impact on your custom object link as they are not in a true relationship.