You need to sign in to do that
Don't have an account?
Vamsi TestPlp
I want to create a new custom button - Grant Access to Parent Account - and call a Lightning Component in it. The apex controller of the Lightning component should add the current user to the Account team of the Parent account of the current account
Sales Force Lightning
Pass the record id from JavaScript to Salesforce apex class. Find the parent account and add the Account Team. Sample code similar to it - http://www.infallibletechie.com/2018/03/lightningdatatable-in-salesforce.html
In the above example, I was extracting data. But, you can call a method which builds the account team.