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
giorgio70giorgio70 

Custom Button to update Form

Hello

 

On my Opportunity Page I would like to create 4 custom buttons called Q1, Q2, Q3 and Q4.

 

When a user clicks Q1, the button should pre-populate the Opportunity Close date with the last day in Q1. I have the logic to perform this, but I am unable to find out if I can actually set the Close Date value on the browser to that it gets visible right away

 

I appreciate any suggestions

Thanks
Giorgio

Imran MohammedImran Mohammed

Without a page refresh, i don't think it can be done.

Or you should be able to do it by overriding Visualforce page that will have the logic to do it.

giorgio70giorgio70

I would go down the path of overriding the Opportunity page with a Visualforce custom Opportunity Page.

 

My challenge would be how to create such button to basically set a value on the "inputfield" tag value

 

Any samples you could point me to?

Imran MohammedImran Mohammed

You will have to use rerender for doing that in your visualforce page and the extension controller will have Opportunity record that is bound to Visualforce page.

Let me know if you need further help.