You need to sign in to do that
Don't have an account?

Call outside Visualforce page from a managed pack
Hi All,
I have created a managed pack. Its namespace is "myNSp"
I want this managed pack to call a Visualforce (VF) page given by the user (person who is going to use my managed pack) .
In the apex code I get the user's VF page from line given below
pdfPage = new pagereference('/apex/'+templateName);
When this code is executed the in the user's Salesforce organization, it say that the "Page does not exist".
I found out that when my managed pack is run in the user's organization it appends "myNSp" when calling the user's VF page. Since user's VF cannot have my namespace it give the "URL does not exist".
Is there a way to the apex application get the true url to user's VF page ?
ie. if I use a code like below, is there a way to get value for 'usersUrlPart' variable ?
pdfPage = new pagereference('https//:'+usersUrlPart+'/apex/'+templateName);
Viraj
u can call ur page like
pdfPage = new pagereference('/apex/'+yournamespace.templateName);