How to get a foreign key value and display in Shipping & Handling Information in Magento 2?

I would like to get and display foreign key value in admin panel under Order > Individual Order > Shipping and Handling Information. I have two tables connected to each other. i.e. order_sales(which have stockid_id as foreign key linked to collect_in_store) and collect_in_store (which have a list of store with name).

Company/Module/Block/Adminhtml/Order/View/Custom.php - <?php namespace Company\Module\Block\Adminhtml\Order\View; class Custom extends \Magento\Framework\View\Element\Template { protected $orderRepository; public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, array $data = [] ) { $this->orderRepository = $orderRepository; parent::__construct($context, $data); } public function checkCollectInStore(){ $orderId = $this->getRequest()->getParam('order_id'); $order = $this->orderRepository->get($orderId); return $order; } } Company/Module/view/adminhtml/layout/sales_order_view.xml - Here what should be the referenceContainer name to display under Shipping block? <?xml version="1.0"?> <page xmlns:xsi="" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="right"> <referenceContainer name="shipping_info"> //This should be under Shipping block <block class="Company\Module\Block\Adminhtml\Order\View\Custom" name="sales_order_view_collect_in_store" template="order/view/custom.phtml" /> </referenceContainer> </referenceContainer> </body> </page> Company/Module/view/adminhtml/templates/order/view/custom.phtml - <?php $check = $block->checkCollectInStore(); $shippingCode = $check->getShippingMethod(); if($shippingCode === 'collectinstore_collectinstore'){ echo 'Collect In Store: '.$check->getStockistId(); //getting id but need to display shop name. } ?>

Now with this code I am getting stockist_id but needs to display name and it should be under Shipping block in detailed order page. How to resolve this?

Read Entire Article