You need to sign in to do that
Don't have an account?

Link custom fields on Quote with Quote Line Items
Hello all,
I have custom checkbox fields in Quotes based on the the values of Product Family field. What I am looking if it's possible is when I insert Quote Line Item and it's Product Family equals with X the checkbox X will become checked.
Any Ideas?
I have custom checkbox fields in Quotes based on the the values of Product Family field. What I am looking if it's possible is when I insert Quote Line Item and it's Product Family equals with X the checkbox X will become checked.
Any Ideas?
You can go with trigger, Here is the sample code,
All Answers
You can go with trigger, Here is the sample code,
I tried the trigger but the custom checkbox on Quotes still remains unchecked
my suggesstion please ensure the Family name is correct while selecting products in quote line item and change the code according to your field and Product family name.
In the above code, i used standard field Family in product object. If you are using any custom field change it according to this..
This will solve your problems.
You can refer this link, it will be helpful for writing test class,
https://developer.salesforce.com/page/An_Introduction_to_Apex_Code_Test_Methods