Extension attribute error “Call to undefined method Magento\Catalog\Api\Data\ProductExtension: : setDummyAttribute() on ProductExtension”

Error : Uncaught Error: Call to undefined method Magento\Catalog\Api\Data\ProductExtension: : setDummyAttribute() on ProductExtension in MyCompany\MyModule\Plugin\DummyAttribute” This is how I have implemented extension attribute. I have used \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory in my function to fetch collection. I have created custom data interface named CustomProductInterface to return my custom data. Basically I am not returning \Magento\Catalog\Api\Data\ProductInterface and instead returning…

Dataprovider doesn’t insert data to UI Component fields

I am new to Magento 2. I am scratching my head why is the data from the Dataprovider doesn’t insert to my fields. DataProvider.php <?php namespace Simple\BrandAdmin\Model; use Simple\BrandAdmin\Model\ResourceModel\Brand\CollectionFactory; use Magento\Framework\App\Request\DataPersistorInterface; class DataProvider extends \Magento\Ui\DataProvider\AbstractDataProvider { protected $dataPersistor; protected $loadedData; /** * @param string $name * @param string $primaryFieldName * @param string $requestFieldName * @param…