+ Start a Discussion

Managed Package limitation questions

I am creating an application that I will eventually distribute via the appExchange as a managed package and have some questions regarding potential limitations that I would like to have clarified.


1.  I would like to place a link to a report on a page layout.  I've followed the instructions in the documentation to find the id for the report and have successfully embedded the link to the report in my application by creating the a relative URL reference as instructed.  But it occurs to me that the report would not have the same id in the customer's installation.  Is that correct?  If so, how can I set up a link to a specific report in a page layout?


2.  I want to create custom buttons for placement on standard objects as well as custom objects.  I have done this successfully with both relative URL's (as in "/apex/mypage") and by linking the button directly to a visual force page.  There are some instances where I would prefer to use relative URL's because I can include parameters.  I have seen some references on these boards which indicate that a relative URL used on a custom button cannot be packaged.  I also heard the following in a recent Salesforce webinar: "You can't package a generic reference to a custom object on a custom button."  Can someone please clarify this for me?  Can relative references (URL's with parameters as I understand it such as /apex/mypage?parm1=test) be used in managed package?  If they can't be used on a button or link, can they be used as part of a pagereference in the apex code attached to the visual force page?  Is there any documentation on this issue?


3.  According to the help documentation, visual force pages are "editable, but not upgradable".  If I want to update a visual force page in my packaged application in a subsequent version, how do I accomplish that?


Any help on these concerns would be greatly appreciated.


1. Some IDs will automatically resolve when installed into a new org. I don't know if reports is one of them. I know custom field Ids in s-controls do, and I've heard that documents do as well.


2.  We currently have custom buttons on the Contact referencing a VF page that's packaged without problems. We create a custom button, and set it's type to URL. The url is "/apex/namespace__vfPage_Name?id={!Contact.Id}" so that the page is context-sensitive to the contact. Does that answer your question?


3. In our experience, VF pages ARE upgradeable, and NOT editable by the subscriber org. I don't think that help page is kept up to date as much as it should... You should be able to package these with no problems. The only drawback is that the code is not hidden, as it is in apex classes.


Thanks for your reply.


Your comments regarding the custom button links were interesting and don't seem to contradict what I thought I heard in the presentation which seemed to indicate that relative references wouldn't work on a custom button on a "custom object" which may explain why they work on the contacts.


I sure wish this were documented somewhere.




Custom Buttons on Custom Objects didn't work for me, until I used the name space prefix.

So If my name space is xxx


/apex/myVFPage?id=dfdfdfd didn't work when managed package is installed in subscriber org.


/apx/xxx_myVFPage?id=dfdfdfd works.







I have this same problem for reports.  Unlike pages, report names don't work in the url. How do I package a button that refers to a packaged report?
Message Edited by hokusai on 12-13-2009 12:37 AM