+ Start a Discussion
Nicola ByersNicola Byers 

Custom button in Lightning

Hi does anyone know hoe to change the url on this button for lightning edition?  https://eu5.salesforce.com/0Q0/e?retURL={!Opportunity.Id}&oppid={!Opportunity.Id}&ExpirationDate={!Opportunity.Expiration_Date__c}
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Nicola,

May I request you to please refer the below link for creating a custom button in lightning. Hope it will be helpful.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar
 
Nicola ByersNicola Byers
Thanks Rahul.  Unfortunately this only tells me that it is not possible.
Eric JJ van HorssenEric JJ van Horssen
Hi Nicola,

Your button, creates a Quote, from an Opportunity, prepopulating the ID, and Expiration Date?

In most situations, you would be able to replace this with an Action instead, but you can not create a Quote from an Action.

Would Expiration Date be something which your users change, when they create the quote? If not, you could use a formula field instead of this field?

Or use a workflow, upon creation of the Quote, to copy that field of the Opportunity? (But this will be after the user saves)

 
Nicola ByersNicola Byers
Thanks, I am happy to add a formula but what would it be for an expiry date 30 days from today's date?
Eric JJ van HorssenEric JJ van Horssen
Hmm, Nicola, a formula, using Today() would always be 30 days from Today, it will simply update.

How about a formula, showing 30 days from created date of the Quote?

(Without testing)
New formula field on quote, return type date
formula:
created date + 30

(Created date, might be date/time, so it will complain, then use:)
datevalue(created date) + 30

Mind you I typed this directly, use the formula editor, to make sure  you provide the function, and field with correct spelling and such.

Sorry, wanted to supply quick answer, otherwise, I would be able to reply later this week with a tested answer
Nicola ByersNicola Byers
Thanks Eric, what is the prefix to the lightning button as we haven't got any set up except standard buttons which you can't access?
Eric JJ van HorssenEric JJ van Horssen
Nicola, indeed, you can only use the standard buttons, so looking at your URL, I realized, that the only need, in your case was the setting of the one date, all other stuff is done by the standard button as well, si if you set that date with a formula field, you do not need a custom button anymore.
Nicola ByersNicola Byers
Thanks. How do you use a formula field in the standard button if you can't edit it?
Eric JJ van HorssenEric JJ van Horssen
If you add the formula as a new field on the Quote object, it will always be there, as long as you add it to the page layout.
Ramakrishna Reddy GouniRamakrishna Reddy Gouni
we can not create custom button in lightning. right now this feature is not available. 

we can achive this task through quick action