1. So what custom fields end __s ?

    I think my answer to “While creating JavaScript button to execute anonymous apex, what should you keep in mind ?” would be why are you creating a javascript button to execute anonymous apex in the first place when it won’t work in lightning UI / mobile etc…

    1. That’s nice suggestion, I will add it. Scenario for sometimes we need JS button to execute apex – We have some utility method which performs operation from Scheduler however, lets say user is on record and they want to force that logic to run. we can simply call existing Apex method from JS so that user doesn’t need to wait for schedule time, something like correcting Apex based sharing or syncing data with external webservice. Understand that Salesforce team is removing AJAX button from lightning coz of security issue but its really very useful in many scenarios.

      1. Yup they even removed javascript from flow when it first came out. Personally I would try everything I could not to use a javascript button. Using process builder to call apex, publisher action… but have to say there is still a bit of a gap. I’m considering at the moment maybe even creating lightning components within Visualforce on the page layout. At least then its “Lightning ready”.

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.