Activity Forums Salesforce® Discussions Onclick Javascript is not working in Salesforce Lightning?

  • Manpreet

    Member
    April 26, 2018 at 5:22 pm

    Hi shubham,

    Unfortunately, Javascript buttons are not supported in Lightning Experience.
    However, Salesforce has provided alternatives for these buttons based on the use cases for which we implement these buttons.
    Alternative: Custom URL Buttons

    Thanks.

  • Aman

    Member
    April 26, 2018 at 6:41 pm

    Hi Shubham,

    Javascript buttons are no longer supported by salesforce but you can use custom url buttons as their replacement.

    Custom URL buttons are suitable substitutes for JavaScript buttons that direct to a page on an external website or that navigate to a different record in Salesforce. For internal Salesforce links, use the URLFOR function and $Action functions or Relative Salesforce URLs (e.g. /{!Contact.Id}) rather than hard-coded URLs (e.g. https://na11.salesforce.com/{!Contact.ID}) to keep your users from getting directed out of Lightning Experience. You can update a JavaScript button to a Custom URL button by updating the Content Source for your button from OnClick JavaScript to URL,

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos