Visualforce関連

The usage of apex:param in Visualforce Page

<apex:param> tag is used to pass values from JavaScript to an Apex controller,it can only be used with the folloing parent tags.   • <apex:actionFunction>   • <apex:actionSupport>   • <apex:commandLink>   • <apex:outputLink>   • <apex:outputText>   • <flow:interview> Here are some small examples of how you can pass a value via apex:param tag in Salesforce. Use <apex:param> in <apex:actionFunction> […]

read more

Display DateTime with TimeZone in Visualforce Page

In Salesforce,Date and Date/Time values are stored in GMT,and a GMT time will be outputed when we use apex:outputText tag. e.g. Result ※Time Zone : (GMT+09:00) Japan Standard Time (Asia/Tokyo) As we know,we can not determine a user’s time zone in a formula,but there has two ways to fix this with Apex,maybe more. 1.Get User […]

read more

Use Salesforce Mini Page Layout in Visualforce Page

Mini Page Layout is a nice feature of Salesforce,it can be maintained for every parent object in master-detail or lookup relationship in order to display additional record information without jumping to its detail page. Enable Mini Page Layout First,navigate to Customize > User Interface and check “Enable Hover Details” which can enable Mini Page Layout […]

read more

Refresh standard detail page from visualforce page in iframe

We may need to refresh the whole page but not only itself, when we use custom visualforce page in standard detail page,and it will not work well if we just use ‘location.href=”/”‘ by javascript. Let me show it in this post.The Problem 1.Prepare a custom object named Sales__c 2.Add an Apex Class “ExtendPageController” 2.Add a […]

read more

Order of execution in Visualforce Page

In this post I’ll show you the order of execution when we views a Visualforce page. Apex Class Visualforce Page Result Log So,In conclusion: 1.Controller constructor 2.Page action 3.Controller property getter

read more

Date format and DateTime format

Date format in Apex 1.Use Date format method 2.Convert to String directly 3.Convert to DateTime DateTime format in Apex Date format in VF DateTime format in VF Date format in Formula DateTime format in Formula TZoffset is the difference between the user’s time zone and GMT。 When in Tokyo:TZoffset = “9/24” Reference : https://help.salesforce.com/help/pdfs/en/formula_date_time_tipsheet.pdf

read more

How to access static resources from Apex, Visualforce and Custom Button

In Apex Normal file (with soql) Normal file (with PageReference.getContent) Zip file (with PageReference.getContent) ※Zip file can not be accessed by soql. In VF Normal file Zip file In Custom Button

read more

SFDC SObject Quick Panel – Quick access to Salesforce Standard Objects and Custom Objects

As a SFDC Developer,how do you open [Custom Object Setting] page, from [Setup] > [Create] > [Objects] > [Object Name] ? In fact,utilizing “sObject Quick Panel”,it could be more fast only need 1-Click. Screenshots Source code Download from Github That is all, Enjoy it!

read more

Salesforce Apex Zip Attachments With JSZip

Sometimes we need to zip Attachments or PDFs and download it at once in Salesforce development. As we know, Apex does not support Zip. it is conceivable that Zip files with other service such as Heroku or AWS, But in fact we can do this without any External Service, just Salesforce and JavaScript. This post […]

read more