+ Start a Discussion
Roger WickiRoger Wicki 

Expose Visualforce page inside Lightning Component in Community Page to the public

Dear community

I have a need of capturing input from clients in Salesforce via passing a parameter in the URL. I know that I can do this via the Force.com domain by publishing a site as I have done this before. Back then, our needs were specific and I didn't think globally enough to name the force.com domain something useful. So I can't do it this way because it is locked to the old domain name. I created a ticket with Support so they change it but I don't know how cooperative they will be and how fast they can do this.
In any way, there needs to be a different possibility. We have Partner Communities available and I know that in general one can serve content to the public over community pages, built with Community Builder. Generally I have a multitude of options here but none of them seem to work. I can put the Visualforce page directly in a page by making the visualforce page available for lightning. But then I can not gather the URL parameter because the Visualforce page is served as an iFrame within the lightning DOM. Another option is to serve the Visualforce page within a lightning component where I can pass the parameter. However, even though the Community page is public and the component is generally visible, the visualforce page inside the component requires login and thus doesn't display to the public.

I don't want to have anything super fancy. I just need to capture the input easily. What is the best way to do that? What steps would I need to undertake to convert my visualforce page to a native lightning thing?


Background info:
We are building our RSVP page and we will send out a mailing with a link to the (to be) public visualforce page in order to capture their participation. The participation is then saved on the campaign member. That's why we need a recipients' ID to pass to the visualforce page. Currently the link will look like
https://<domain>/apex/PartyRSVP?cmid=<hashed campaign member ID>