Access parent Id in a linked record

I am trying to create a plugin and in that i have following requirement.
I have a model A and another model B.
B is linked inside A as
A → B
Now when i am editing the B inside A, i want to get the ID of A, is this possible in any way?
Thanks in Advance.

Hello @adeel and welcome to the communtiy!

I think you are looking for this right here: Content Delivery API - Direct vs. Inverse relationships - DatoCMS Docs

Hello @m.finamor Thanks for quick reply, Actually i am working on web preview plugin.

My case is i am editing B model which is linked inside A model. Now when i am clicking on B model, it is opening a new Modal for editing and i am not able to get the id A record as plugin is opening inside Iframe.


@adeel you can make API requests inside your plugin logic, (however you can only use the CMA (the REST API) to make them, but you can do so by following this guide: Plugin SDK - Additional permissions - DatoCMS Docs