You need to sign in to do that
Don't have an account?
Jeff Bryant 16
How to get URL for Lightning Component
I have a Lightning component that deletes records as a URL button on a related list. I'm trying to find out how to get the URL for the Lightning component to call it to delete the related list records. Also, in order to delete the records would I have the call the Lightning components URL plus the recordid?
Greeting!
To get the URL for the lightning component you can use lightning:isUrlAddressable.
it will get the URL parameters in lightning components.
you can have the reference of the link below
https://www.sfdcstuff.com/2018/09/lightningisurladdressable-interface-way.html
if you find your solution mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi
Recommend trying the approach mentioned in https://salesforce.stackexchange.com/questions/169325/delete-multiple-records-from-custom-objects-with-lightning-components
Recommended read: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_delete_record.htm
If this information helps, please mark the answer as best. Thank you