0

I am invoking a vf page from a button and I was hoping to get the id from the url parameter. However the value comes to the vf page as a long string of characters. What can I do to get the value passed?

Button or Link URL /apex/SendInvoiceEmailLWCPage?id={!AVAB__SO_Document__c.Id} becomes

https://***.lightning.force.com/one/one.app#eyJjb21wb25lbnREZWYiOiJvbmU6YWxvaGFQYWdlIiwiYXR0cmlidXRlcyI6eyJhZGRyZXNzIjoiaHR0cHM6Ly9jdXN0b21lcmRvbWFpbi0tbXJhY2NvdXRnLmxpZ2h0bmluZy5mb3JjZS5jb20vYXBleC9TZW5kSW52b2ljZUVtYWlsTFdDUGFnZT9pZD1hMkQwbTAwMDAwMlBkVUUifSwic3RhdGUiOnt9fQ%3D%3D

Thanks.

0

You are in Lightning Experience. Visualforce pages run in iframes in Lightning, so they cannot access the parent URL. See the Visualforce and Lightning Experience Trailhead.

2
  • Awesome! You are absolutely right! After switching to classic I get this..https://***.c.visualforce.com/apex/SendInvoiceEmailLWCPage?id=a2D0m000002PdUE
    – Pauline
    Dec 4 '20 at 7:05
  • Thanks! @David.
    – Pauline
    Dec 4 '20 at 7:07

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.