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
tklinetkline 

Custom List Button

Hey guys-

 

I'm totally new to APEX so I could really use some help.  I'm sure what I'm asking for is pretty simple but I'm not quite sure how I can set it up.

 

Essentially I would like to create a Custom List Button that allows Sales Reps to request a proposal.  They currently request a proposal like a standard task.

 

I would like to set it up so that when the button is clicked, it automatically populates a few fields with certain info (the activity record type ID to request a proposal is "012A0000000wuXF" :

 

Assigned To  - this field would be prepopulated with the users name who is responsible for putting proposals together.  This will always be the same person.

 

Type - this would populate with the picklist value , "Proposal Request"

 

Subject -  this would populate with the following naming convention - ACCOUNT NAME - DATE - Proposal Request

 

Related To  - this wouldn't change, it would be related to whatever object record the request was created in

 

Send Notification Email -  this would automatically be checked as TRUE

 

The rest of the fields would have to be filled out by the sales rep, but this would save them alot of time and would also ensure that all of the critical steps are performed (our reporting depends on it).  Any help would be greatly appreciated!

 

 

 

cloudcodercloudcoder

You will need to create a Visualforce page with a standard controller and a controller. The controller would include the logic required to pre-populate your fields on the Visualforce page.

 

Adding the standard controller will allow you to create a custom button and 'point' it to your Visualforce page through the config tool.

 

LMK if that is enough to get you started in the right direction.

tklinetkline

Thanks much for the fast reply.  Definitely steers me in the right direction, but just like APEX I'm totally new to Visualforce as well so I'm still lost.  I'm sure explaining it in detail would be very involved and I wouldn't ask you to do that.  Thanks again for your help.