140

ALERT UPDATE (Spring'16) These workarounds were never supported by Salesforce officially. They have worked for many years but now the are no longer possible with the Spring'16 Update. It was announced by Salesforce in 2015 that even the workarounds described in the section below for Winter'16 are shut down with the Spring'16 Release, in February 2016. I ...


22

The policy announcement is very clear: In Summer ’15 we will start removing unsupported code from HTML Area home page components. As a result, components that contain JavaScript, CSS, iframes, or other unsupported markup might stop working properly. To use JavaScript or other advanced HTML elements in your home page component, we recommend that you use a ...


21

Use Case: Embedded Visualforce Page on Layout My top1 is to embed Visualforce Pages on standard layouts with a dynamic height of 100% of it's content instead of a fixed height in px - which can not be anticipated in most cases at design-time. This happens quite often if you display dynamic data like tables or lists with variable content. Within the ...


14

Use Case: Wide Input Controls for Edit and Inline-Edit By default the inputs on record edit pages are very small. This comes because there is no with set and the browser comes up with a default width of about 140px. Even on small screens with 2-column layouts the UX is very poor. E. g. longer Account or Opportunity names are not fully readable without ...


11

Other answers have a pretty good overview of the current workarounds within Salesforce and the reasons for this change (security). However, one possible workaround feasible for controlled internal environments, would be to write a browser extension to handle this. For example, it's pretty trivial to write a Chrome extension that executes JavaScript on a ...


10

Note: I don't believe this is officially supported by Salesforce as it leverages the sidebar injection hack. As such, it could break with future releases if Salesforce prevents this in future. That being said, it makes embedded Visualforce pages look much, much cleaner, and we've been using it in our org for a few months now. I really hope Salesforce will ...


9

your only choice at this point is Javscript. I am doing the same thing as we speak. google cdn reference to jquery, $.ajax(function(){ load visualforce page, returns json} render json data into page. and you need to use jsonP as well. visualforce pages are housed on a different domain. function jsonpcallback(data){ $('#id').html(data.amount); } ...


8

Here's a few more use cases for having to go to hackerama land: Run Assignment Rules Box on Page layouts: This is located at the bottom of the "Edit Page" layout, it cannot be moved, it has little if any explanation, users can click it, unclick it - firing off assignment rules that may or may not be necessary. This should be a standard - moveable field that ...


6

Use Case: Override Quote View It seems to be not possible to override to View of Quotes. The Override is the typical official solution pattern when it comes to embedding of custom vf-pages on layouts and you need more features like dynamic-height or top-window-reload. Now on Quotes, the override option as avoid-pattern is not present. Workaround Inject a ...


5

Just to be clear what you are working with... On a Home Page Layout you have a Custom Home Page Component (named as 'Test Case') configured as an HTML Area containing an IFRAME that has a 'src' attribute directed at a VisualForce page, correct? If so, on the VisualForce page markup <apex:page /> tag, do not specify a tabStyle attribute value and it ...


5

This is a Home Page component that is embedded on the side of most pages. You can run custom code from the sidebar using the general following steps: First, click on Setup > Customize > Home > Home Page Components > New (HTML, narrow). Next, toggle the HTML view mode (the checkbox). Then, enter in some sort of JavaScript. For example, you might do ...


5

force:hasRecordId is meant only for the Lightning experience and App builder and not the community builder . For the community builder the way I have managed to get the record id is as below Create a design file like below <design:component> <design:attribute name="recordId" label="recordId" description="Salesforce Id of the record" /> <...


5

For Everyone who will need this in most recent version you can add this code in the css to hide the Home in the navigation Menu. .comm-navigation__list > li:first-child { display: none; visibility: hidden; }


4

Try wrap it with link to your report like this: <a onclick="window.top.location = '/REPORT_ID'"> <analytics:reportChart reportId="REPORT_ID" size="tiny" cacheResults="false"></analytics:reportChart> </a>


4

Now there is official information from Salesforce about this. They will kill this workaround with the Spring '16 Release, which is currently trageted for February 2016. Email from Salesforce Admins of Orgs which are using this technique should receive an email like this: ATTENTION: Messages & Alerts and Custom Link Components Changes At ...


4

You actually can do it via the $Permission global variable. Note the global variable checks if the running user has a Custom Permission, not a PermissionSetAssignment. Create a Visualforce Homepage Component as follows: <apex:page standardStylesheets="false" showHeader="false" sidebar="false"> <apex:outputLink rendered="{!$Permission....


4

force:hasRecordId is supported in communities, you can reference it in your component markup as follows: {!v.recordId} or fetch it as if it were an attribute from your controller as follows: component.get('v.recordId') Quick note, it has to be used in an object detail or record detail page within communities.


3

YOu can add the below script in you component <script src="/resource/jQuery"></script> <script> var j$ = jQuery.noConflict(); //on document ready j$(function(){ j$("h2.brandPrimaryFgr").each(function(){ //add your component name here if(j$(this).text() == 'your component name'){ j$(this).parent("div").hide(); } }); }); ...


3

The correct answer is that you cannot change the display type after creation. This restriction is in place because the component may be used in one or more layouts, and changing it would violate those layouts' constraints. In short, this limitation is there so they could ignore the next logical question: should they remove modified components from layouts, ...


3

Try this: <script> var oShell = new ActiveXObject("Shell.Application"); var commandtoRun = "C:\\Windows\\notepad.exe"; oShell.ShellExecute(commandtoRun,"","","open","1"); </script> Have in mind that ActiveXObject only works on IE, if you are looking for a cross browser solution read this. How to do it on FF: https://developer.mozilla.org/en-...


3

Messy. Real shame that stuff like {!$User.Username}, {!$UserRole.Name} doesn't work in the HTML components. If you have to scrape - try to do it by user id, not by name of the user. I've recently fixed an interesting bug where one trigger didn't work for Hungarian users - trigger was looking for FirstName LastName and Hungarian locale flips the order like ...


3

If the users are of the same profile then You can create differnet home page layout include the component and associate a specific layout to the profile setup-- customize -- home --home page layout


3

You can add an HTML area component that contains an iframe that loads a VisualForce page with code that generates the URL for the New action of your custom object. <iframe style="background:transparent; border:0; overflow:hidden" src="/apex/<Name of VisualForce page>" height="100" width="100%"></iframe> Change <Name of VisualForce page&...


3

Depending on how you would like to implement this, Salesforce already provides some options. Custom tab's allow a "Splash Page Custom Link" to be defined, the Custom links that show in the drop down are configured under Setup -> Customize -> Home -> Custom Links. And one of the link types you can create is a visualforce page. As part of the splash page, ...


3

A hierarchical custom setting where you can specify a value per user, could be a possible solution to hold the dismiss value once a user has checked it. http://blog.jeffdouglas.com/2010/02/08/using-hierarchy-custom-settings-in-salesforce-com/


3

No. If you go to the Home page setup My Name->Setup->App Setup->Customize->Home you will see options for Home Page Components, Layouts and Custom Links. On the Components page the only standard components that can be edited are Messages & Alerts and Custom Links. If you go to the Page Layouts you will see that your only options are which to ...


3

When creating your Link you can pick the Visualforce page source like so... Then assign the Link to a component... And finally to the layout... My page shows in the sidebar like so and popups up in a new window... Like so... My page source is this, note I've removed the sidebar and header... <apex:page sidebar="false" showHeader="false" > <!-...


3

On line 7 i < actionLinks is working as html markup not script and it is unable to find closing >. This is happening because of html encoding you have done.


3

You can display an image in the wide area by creating an HTML component and then editing the source and creating an image tag. Here are the steps to get it done. Image Prep Make sure that you have your image as externally availble. Copy the URL to the image. Do this by right clicking on the image and copying the image URL, or opening the image in a new ...


3

Do I have to change the j$().text to fit with a checkbox? This is correct. I went and started to look at the HTML for checkbox and saw it is in fact an image that they are using. What I suggest is to read an attribute from that image such as alt or title as you can see how the HTML looks below <div id="00N50000003JWbq_ileinner"> <img src="/...


Only top voted, non community-wiki answers of a minimum length are eligible