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
nikkitorschnikkitorsch 

Custom Button to Submit Selected Records from the Default View Page for APPROVAL

Hello All,

I require some urgent help. I need to create a custom button on the Default List View Page to Submit selected records for Approval.

The records will be selected using the Action Checkbox provided i.e. i need to check the CheckBox provided under Action column to select the records, and after selecting the records click on the Custom button to submit those records for approval.

Can it be done? And if so, please let me know how.

I have created the Custom Button as follows:

Label: Submit
Name: Submit
Object Name: Time Entry
Display Type:  List Button
Behavior: Execute Javascript
Content Source: OnClick Javascript
Display Checkbox is checked for multiselection

Approval Processes:
Process Name: Time Entry Approval
Unique Name: Time_Entry_Approval

Please help me. This is urgent.

Thank you,
nikkitorsch
sandeep@Salesforcesandeep@Salesforce
You just need to create a custom button and need to bind it with VF page where in controller side you need to write a code to insert ProcessInstance for this record so that record gets submitted from draft in to approval state.
nikkitorschnikkitorsch
That isn't what I needed. I still need assistance on this question. Can anyone help me with the coding on this particular request? I have created the custom buttoms as OnClick JavaScript. I've also created a custom object, Time_Entry. I'd like to select multiple records from the Time Entry List Detail Page's Action Checkbox and SUBMIT them through the Approval process. I'd also like to select multiple records and APPROVE.