+ Start a Discussion
Sabrina POTIN 13Sabrina POTIN 13 

create custom link button on opportunity list view

Hi All,
I need you help. I am trying to create a New Button or Link on opportunity ( under Lightning UX).
I would like this button (URL button) to replace the standard "New" Button on opportunity list view and opportunity related list on account.

I would like to create a new opportunity with predefined values for stage and close date fields.
When creating a new opportunity I would like stage = "New" and close date = TODAY()+30.
I read several articles and tried to do it by myself without any success.

Can you please help me ?
Thanks in advance
Best Regards

Sabrina
Rishabh Bansal 23Rishabh Bansal 23
Hi Sabrina,

You can simply override the new button in opportunity by following these steps:-
Setup->Object Manager->Opportunity->Button,Links and Actions->New Button
then you can select your lightning component with which you want to override your page.

User-added image

Thanks,
Rishabh Bansal
Sonali_takkeSonali_takke

HI Sabrina,

1. You can ovveride new button displayed on Opportunity->Button,Links and Actions using VF Page or Lightning component. It will override the new button from each standard page where it is added.

2. Another workaround is to create custom URL button. 
Setup > App Setup > Customize > Accounts > Page Layout > Edit > Go to related list > Properties of Opportunity Related list > Buttons > Select your custom button from multiselect picklist and add it in Selected Button picklist > Uncheck standard new button-> Save.

3. To create a new opportunity with predefined values for stage and close date fields. It is possible in standard way till now but workaround is- You can create simple lightning component with predefined values for required fields and override the new button. Onclick of save open opportunity record  in edit form to fill other details.

Mark as solved if this answer helps you! Thanks!!

 

Sonali_takkeSonali_takke

Hi,

Another workaround is create global action. You can add predefined values for picklist there and add action on publisher layout. The layout isn’t associated with an object, and it populates the global actions menu in Lightning Experience. Users can access the global actions menu by clicking  in the Salesforce header.

Sabrina POTIN 13Sabrina POTIN 13
Hi,

Thanks for your replies. Unfortunately, I did not help me to solve my problem.
I created a global action but it does not allow me to put the button on account associated/related list for opportunity.
Moreover, I am not allowed to put this button on list view for opportunity (Search layouts for salesforce classic).

Concerning, the solution "override the new button", I am not allowed to use code or visualforce page.
Is there any way using URL links button to create a button which enable to create a new opportunity (with predefined values) from opportunity list view and/or from opportunity related list on account ?

Thanks in advance
best Regards

Sabrina