function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Can I create a custom button with custom page on quote ??

I need to add some customization to the quote / quote line items.   We need the ability to be able to prorate some line items where each line item can have a different begin and end date.  So I was thinking about adding some custom fields (checkbox for prorate and two dates: begin and end date) to the quote line item and a custom button to the quote called "Adjust Line Items" and a trigger on the Quote.


So Is it possible to create a custom button on the Quote that would bring up a custom display that would show all the quote line item fields where the user could edit the necessary fields.   For example, the user could check prorate and enter a begin and end date for the line items that needed it.  Also it is possible to add a trigger where when the fields change (like prorate checked and there is a begin and end date) update the line item price and total.   Also, is it possible to add a save and cancel button to this custom page that would trigger on save to update the quote.


If this is possible, do I create a custom object that represents this and that object has a page layout?


Just learning and have alot of ideas on what I should do but not sure if they are all possible.

Best Answer chosen by Admin (Salesforce Developers) 

Wouldn't it be easier to simply add these fields to the quote line item page layout? 


As for the rest, just note that the line item total price is hard coded in SF and cannot be manipulated.  So you will have to set up a work flow that calculates the prorated price and writes that to the sales price field.  Then the total price will be calculated off of the sales price.