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
SUJAY GANGULY 5SUJAY GANGULY 5 

Lightning Button

at Closed Own stage,  will get a Send Terms button (if the Terms type is CREDIT CARD and account type is PREPAID, otherwise the button will be hidden.). will click on the button and a mail will be forwarded with the payment link to the opportunity billing contact email id. Account name and Opportunity name also store in the Inside of the payment link.

please tell me how can I do this. I done lots of R&D but not achieved it.
NagendraNagendra (Salesforce Developers) 
Hi Sujay,

Based on your requirement, it seems that you would need an automation that changes the record type of the Opportunity from record type A to record type B when a stage is changed to Closed Own. Record type B will have a page layout that has the Send Terms button. This can be done either via Workflow or Process Builder.

Your next challenge would be creating the Send Terms button if you don't have it yet. As per your requirements, you would need a custom button that is calling a custom code(apex or flow) to be able to send the email with an email template that has the fields you need.

Hope this helps.

Thanks,
Nagendra