filter documents tab/ Library list for a custom entity

Hi All,

I have created a custom entity and added 'Document' as a tab. I edited View accordingly. But The list now showing all the documents. I would like to list the document that is related to this entity only. I have saved the new entity id in the library table. But unable to pass that value while loading the page.

Any idea how can I pass the id while loading the document tab? 

Thanks in advance.