0

In Magento 2.2.5, How to change the URL of save button in the admin grid.

Note: I am not creating grid through ui_component, I am creating grid using layout.

Reference: Ref 1 Ref 2

  • What you want to change <item name="save" xsi:type="string">Vendor\Module\Block\Adminhtml\Edit\SaveButton</item>? – Rutvee Sojitra Oct 9 '18 at 6:20
  • @RutveeSojitra It is not Ui component Grid – Saravanan DS Oct 9 '18 at 6:21
  • Okay so in layout what you want change? means which url url are you talking about? – Rutvee Sojitra Oct 9 '18 at 6:22
3

You can modify the save button URL by overriding the getSaveUrl() function.

Navigate to

app/code/Vendor/Module/Block/Adminhtml/Module/Edit.php

add the following function in this file

public function getSaveUrl()
{
    return $this->getUrl('module/controller/action');
}

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.