Whenever i create an opportunity record and add a "product" to that opportunity, "amount" field will be updated with productpricebook amount. amount is a readonly field in opportunity.
I want to do same using custom object and opportunity.
I am having a custom object "test" and another object opportunity.
In "Test" object i am having fields "Product(lookup)" and "Opportunity(lookup)".
In "test" object is child of product. whenever i select a lookup in test object and saves a record, product price must update in opportunity amount(which is readonly field).
Can i update readonly amount field with custom object product amount???
I tried to change it from developer console but since it is readonly field we can't edit directly. Please some one suggest a solution for it