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

  • Amount field by default is not ReadOnly. Maybe you set it as readonly for other reasons?
    – user9959
    Commented Jan 31, 2015 at 16:52
  • 1
    Amount field in opportunity is standard field when u create opportunity and 1 product to it, product price is updated there then edit the record u can see amount field as readonly.
    – swa
    Commented Jan 31, 2015 at 16:57
  • 1
    this is for question u posted 2) I fill product 1st and select Opportunity and saves the record. then product pricebook amount must update in the opportunity amount . Both opportunity and product are mandatory field in custom object
    – swa
    Commented Jan 31, 2015 at 17:01
  • 1
    for 1) No, i want to update(decrease/increase) amount based on products added from test object.
    – swa
    Commented Jan 31, 2015 at 17:03
  • 1
    Can u pls guide me how can we do it with trigger just workaround for me so that i can complete it using trigger
    – swa
    Commented Jan 31, 2015 at 17:18


You must log in to answer this question.

Browse other questions tagged .