Tried with

 var target = document.getElementsByClassName('modal-header slds-modal__header');


var label =  document.getElementsByTagName('p');

but in both empty array is recieved.

  • can you provide source code ? – Oleksandr Berehovskyi Sep 24 '18 at 11:04
  • The Quick Action Button which i created is calling a component , and in the component controller i am trying retrieve the label of modal which i have given while creating the action button. The Label which comes in the header of the modal.It's not custom look, it is the general standard modal which salesforce provides – Gaurav Prakash Sep 24 '18 at 11:08

Due to the Locker-Service, you can not communicate with the container app. Either use the force:lightningQuickActionWithoutHeader interface or use the bundle version less than 39.0.

You can verify it by executing the same code snippet in chrome console. If you get something in the Chrome console then Lightning Locker Service is creating an isolation layer.

I hope it serves your purpose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.