how can I get product id from new product before save event.I have used below code but it will create blank product in database every time.
$newProduct = $product->duplicate();
echo $product_id = $newProduct->getId();
any other way to get product id before product save.