Skip to main content

Visualforce Reference: URLFOR Reference, Confirmations, Labels, and Access

Another Post for referencing urlfor and other describe mechanisms within visualforce

urlfor:
{!URLFOR($SControl.MySControlName)}
  {!URLFOR($Resource.CorpZip)}
{!URLFOR($Resource.CorpZip, 'images/logo.gif')}
{!URLFOR($Action.Account.New)}
{!URLFOR($Action.Account.view, account.id)}
{!URLFOR($Action.Account.Edit, account.id)}
{!URLFOR($Action.Account.delete, account.id)}
{!URLFOR($Action.Account.Tab, $ObjectType.Account)}


onclick="return window.confirm('Are you sure?');"

Labels and Names
{!$ObjectType.Opportunity.label}
{!$ObjectType.Opportunity.fields.stagename.label}
{!$ObjectType.Opportunity.name}
{!$ObjectType.Opportunity.fields.stagename.name}


Object Access
{!$ObjectType.Account.Accessible}" Updateable, Deletable, Createable

Spinner

<apex:actionStatus id="status" >
 <apex:facet name="start"><apex:image value="{!URLFOR($Resource.blackbox, 'images/spinner-black-small.gif')}" style="padding:2px 4px;vertical-align: middle;margin"/></apex:facet>
</apex:actionStatus>

Comments

Popular posts from this blog

Override Name in the Salesforce Cloud Console

Service Cloud Console HyperLink Opens new window outside of the console, Opens new tab inside the console. HYPERLINK("javascript:if(typeof(srcUp)=='function') {srcUp('/" & Id & "?isdtp=vw');}"+ " else {window.location.href='/" & Id & "'}", User__r.FirstName + ' ' + User__r.LastName, "_self" ) Checks if the srcUp exists and if it does, you're in the console.

Salesforce/jQuery Hide the SubSections in the Standard Layout

Here is another of my handy code snippets used to hide the subsections of a standard layout. Embed a vf page inside the standard layout and add this jQuery logic. <script> //This is the magic that hides all of the subsections //I love jQuery j$(document).ready(function() { j$('.hideListButton', parent.document).addClass("showListButton"); j$('.pbSubsection', parent.document).slice(1).css("display","none"); j$('.hideListButton', parent.document).removeClass("hideListButton"); if({!Account.Recordtype.name='internal'}){ j$('iframe[title=apex_page_name]', parent.document).css("height","200px"); }else{ j$('iframe[title= apex_page_name ]', parent.document).css("height","0px"); } }); </script> and #kachow Please note: Salesforce may change the css at any poi...