Skip to main content

Posts

Anchor footer to the bottom of the page

Isn't it super annoying how the footer in Aura templates jump around? I've got a solution for you. The exact CSS override you need to do might vary based on the template you're using, but here's sample code that should do the trick. /* anchor footer to bottom of page */ .siteforceThemeLayoutStarter { min-height: 100vh; position: relative; } .siteforceContentArea { padding-bottom: 3rem; } .footer { bottom: 0; height: 3rem; position: absolute; width: 100%; } You need to update the rem to handle the height of your footer.

Reset Security Token missing in Setup but you still need it?

I've ran into this issue many times. Some integrations require a security token. However, there are trusted IP ranges enabled for the org and when those are enabled, you won't see the reset token link when logged in from an address in a trusted range. To get around this, use the following URL: https://[replaceThisWithYourSalesforceOrgDomainHere]/_ui/system/security/ResetApiTokenEdit?retURL=%2Fui%2Fsetup%2FSetup%3Fsetupid%3DPersonalInfo&setupid=ResetApiToken Just make sure that you're logged in as the user you want to reset. Presto chango! It's a lifesaver.

Special Date Values for Filter Criteria

If you do a tabular report, you have the option of limiting it to the top 5.  You do this in the custom filter portion of the report design. Here's all the special date filters -- copied from Online Help Special Date Values for Filter Criteria Available in:  All  Editions Use the following special date values when defining filter criteria using dates. If you choose a date field (for example, Create Date,  Last Update Date ) as a filter criteria, the value can be a date in the format allowed by your Locale setting or any of the following special values: Special Date Value Range YESTERDAY Starts at 12:00:00 a.m. on the day before the current day and continues for 24 hours. TODAY Starts at 12:00:00 a.m. on the current day and continues for 24 hours. TOMORROW Starts at 12:00:00 a.m. on the day after the current day and continues for 24 hours. LAST WEEK Starts at 12:00:00 a.m. on the first day of the week before the current week and cont...

Add Attachment and Create a Record on the Same Visualforce Page

This article explains how you can upload an attachment while creating a new record to any SObject using Visualforce. Salesforce.com desktop screenshot Salesforce1 mobile screenshots  ------------------------------------------------------------------------------------------------------------ Visualforce Page <apex:page controller="SafetyObservationExtensionController" > <apex:messages />     <apex:form id="theForm">         <apex:pageBlock title="New Safety Observation Form">             <apex:pageBlockButtons location="bottom">                 <apex:commandButton action="{!cancel}" value="Cancel"/>                 <apex:commandButton action="{!save}" value="Submit"/>             </apex:pageBlockButtons>             ...

Solution to a compiled formula being too big to execute

Have you ever ran into a problem when creating a formula field where you get the error that the compiled formula is too big to execute (i.e. "Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (7,498 characters). Maximum size is 5,000 characters.")? You might think that splitting the formula into two formula fields and then combining the two values into another formula field will circumvent the problem, right? Wrong. You are getting this error because SFDC counts every character used to create source fields for a formula. There are two approaches to take: (1) shortening API Names, and (2) using Workflow Filed Updates. Shortening API Names: You can try shortening API names, but this has not helped me much in the implementations that I have delivered. Workflow Field Updates: The best way around the limit is to use workflow field updates since: they do not have a compile limit, and; the compiled size that is reference...

Replace the Salesforce.com logo with a company logo

Having the Salesforce.com logo in the top left of your Org can make it feel like you are using a tool that is not built for your company. Fortunately, there is an easy way to brand your Org with your company's logo. Follow these simple steps: Import the company logo Go to All Tabs > Documents. Select the "Documents" object and the "New" button. The document name will be something like "CompanyLogo.jpg". Set "Externally Available Image" as TRUE. Choose to place the record in either a custom Admin folder to separate from other document files or place it in your "My Personal Documents". Upload the file from your computer. I recommend that the image you attach be 200 pixels width, 45 pixels height, and no more than 20KB in size. Try to use an image with a transparent background since SFDC's background uses a gradient color scheme. Save. Create a custom App Go to Setup > Build > Create > Apps. Select ...

How to create a custom button to open Visualforce page

Let's say that you are working in a large Org and different groups throughout the company use the same object, but each a little differently. Instead of overriding the standard "Edit" or "New" buttons, create a custom button. For example, there is a custom object on the standard Opportunity object and you want to launch a different page layout for your sales team for a custom quoting object. Create your "Quote" Visualforce page. Create the custom button on the custom object. Label: New API Name: New_Quote Type: List Button Content Source: OnClick JavaScript Behavior: Execute JavaScript Button or Link URL: window.open("/apex/InputVisualforcePageNameHere?RecordType=InputRecordTypeIdHere&retURL={!Opportunity.Id}&cancelURL={!Opportunity.Id}&saveURL={!Opportunity.Id}","_parent"); Edit the Opportunity page layout for the sales team and modify the buttons on the related list to add your custom button. In ...

How to Format Number or Currency Values in Conga (Word)

Formatting Number Values The number formatting parameter begins with \#, followed by any combination of the following parameters.  Please see the examples following this table. When Conga Composer populates a numeric value, the digit grouping symbol (the “thousands separator”) is defined according to your Locale settings (as defined in Salesforce’s Setup | Personal Information) or according to the Culture or CurrencyCulture Conga Composer parameter. Despite the cultural settings that govern the output from Conga Composer, within an appearance parameter, you must use a comma (",") for the digit grouping symbol (for thousands) and a period (".") as the decimal symbol. ​   PARAMETER DESCRIPTION 0 (zero) Specifies the requisite numeric places to display in the result. If the result does not include a digit in that place, Word displays a 0 (zero). Example: { = 4 + 5 \# 00.00 } displays "09.00". # Specifies the requisite numeric places to display in the r...

How to create a Visualforce button to call Conga Composer

To create a Visualforce command button to call Conga Composer, you’ll need to access the current Session Id and Partner Server URL endpoint.  Example Visualforce button that defaults the template, output as PDF, does not automatically log after merging, attach file to "Notes and Attachments" related list without task record, and creates a unique name for the merged document: <apex:commandButton id="ButtonPDF" reRender="none" value="Generate PDF" onclick="window.open('https://www.appextremes.com/apps/Conga/Composer.aspx?SessionId={!$Api.Session_ID}&ServerUrl={!$Api.Partner_Server_URL_210}&LG3=2&LG4=0&DefaultPDF=1&Id={!CustomObject__c.Id}&TemplateId=a17n00000008aVS&FP0=1&OFN={!CustomObject__c.Name}+--+{!CustomObject__c.CustomField__c}+--+{!CustomObject__c.CustomField__c})','_blank','toolbar=yes, scrollbars=yes, resizable=yes, top=50, left=300, width=700, height=525' );" /> ...

Output File Parameters for Conga Composer

Output File Parameters The following parameters affect the output file generated by Conga Composer. PARAMETER DESCRIPTION DefaultPDF=[0 or 1] Sets the default output type to Adobe Acrobat If set to 0, "Output Format" is "Same as template" (default) If set to 1, "Output Format" is "Adobe Acrobat" The user may override this choice unless the “Lock Output to PDF” parameter (fp0=1) is enabled. FP0=[0, 1 or 2] Locks the output file format If set to 0, "Output Format" is "Same as template" and not locked (default) If set to 1, "Output Format" is "Adobe Acrobat" and  the Output Format radio buttons are locked. If set to 2, “Output Format” is “Same as template” and the Output Format radio buttons are locked OFN=[text] Sets the Output File Name, overriding the default output file name Requires: A text value to use for the output file name You may use static text or m...