I have a client who has a custom visualforce page that is embedded on the standard Lead page via page layout. What they would like to do is have this embedded page appear conditionally based upon various criteria in the Lead Object. I have been able to implement this using a Home Page Component that uses javascript to find and hide the embedded content based on certain criteria it finds on screen. I have a couple questions about this technique:
- Is there a better way to accomplish this?
- How will Salesforce look upon this if they decide to create an AppExchange product out of this?
Thanks
In case anyone is searching for an answer to this I will post how I resolved it – I used a Home Page Component and added it to the “Narrow Components to show”. I also selected “Show Custom Sidebar Components on All Pages” in User Interface. This allowed me to embed a little javascript on each page. Next I added my vf page inside a section into the page layout for Leads (for example). I then looked for this section header and, if found call twistSection()
Here’s a snippet:
}
I never found out if Salesforce frowns on the practice or not or if it will impact inclusion in the App Exchange or not.