1

I have a custom admin module which store customer related data. My custom table created foreign key with customer_id.

I displayed customer name, email in my module grid by join query, It's working but how to set data to edit action by join query.

Thanks

2

I have completed by add below function to Model Resource

protected function _getLoadSelect($field, $value, $object)
{
    $select = parent::_getLoadSelect($field, $value, $object);

    $select->joinLeft(
        array('t_b' => 'table_b'),
        $this->getMainTable() . '.id = t_b.id',
        array('columnA'));
    return $select;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.