In Magento 2, I need to set the custom price of a product pro-grammatically when admin creates an order from backend.
For example, in this page
'www.site.com/admin/sales/order_create/index/key/a0f4c...
when an admin click's 'Add Selected Product(s) to Order' (after clicking 'add products'), I want to compute prices of that selected products through some formula then assign these prices as a custom price to that products.
So what I really need is a piece of code by which Magento assigns custom price to product.