private function updateSalesOrderGridEnvironment($orderId, $environment)
    {
        $environmentName = $this->getEnvironmentName($environment);

        $resource = $this->_objectManager->create('Magento\Framework\App\ResourceConnection');

        //Getting connection
        $connection  = $resource->getConnection();
        //Getting full table name
        $tableName = $resource->getTableName('sales_order_grid');
        //Update sales_order_grid query
        $mapsDeleteQuery = "UPDATE $tableName SET environment='$environmentName' WHERE entity_id=$orderId";
        $connection->query($mapsDeleteQuery);
    }
private function updateSalesOrderGridEnvironment($orderId, $environment)
    {
        $environmentName = $this->getEnvironmentName($environment);

        $resource = $this->_objectManager->create('Magento\Framework\App\ResourceConnection');

        //Getting connection
        $connection  = $resource->getConnection();
        //Getting full table name
        $tableName = $resource->getTableName('sales_order_grid');
        //Update sales_order_grid query
        $mapsDeleteQuery = "UPDATE $tableName SET environment='$environmentName' WHERE entity_id=$orderId";
        $connection->query($mapsDeleteQuery);
    }
private function updateSalesOrderGridEnvironment ( $ orderId , $ environment ) { $ environmentName = $ this -> getEnvironmentName ( $ environment ) ; $ resource = $ this -> _objectManager -> create ( 'Magento\Framework\App\ResourceConnection' ) ; //Getting connection $ connection = $ resource -> getConnection ( ) ; //Getting full table name $ tableName = $ resource -> getTableName ( 'sales_order_grid' ) ; //Update sales_order_grid query $ mapsDeleteQuery = "UPDATE $tableName SET environment='$environmentName' WHERE entity_id=$orderId" ; $ connection -> query ( $ mapsDeleteQuery ) ; }
Update environment in sales_order_grid table

@param int $orderId
@param string $environment
Update environment in sales_order_grid table