function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kevin WilliamsKevin Williams 

Calling visualforce page from custom lightning component in community

We have a Napili based community (with custom lightning components) in a sandbox (DEV) with url = https://dev.cs21.force.com
We created another community in another sandbox and migratated everything over (DEMO).
The new sandbox url = https://demo.cs21.force.com/membership
(NOTE the community in DEMO now has "/membership" as part of the url.

We have a button on a custom lightning component that calls javascript that calls a visualforce page to initiate a docusign envelope creation.
The javascript uses window.open.
In DEV the url we call = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID=..."
(NOTE - This works perfectly in DEV)

The same javascript url does not work in DEMO.
In DEMO I had to change the url to -
url = "/membership/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID=..."

Any idea why I had to add the /membership to the /apex url?

Thanks in advance.
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Kevin,

May I suggest you please refer the below link to reference. hope it helps.

Please mark it as best answer if the information is informative.

Thanks
Rahul Kumar