Adminstrator · Apex · Visualforce

Redirect to Visualforce page from Custom Button using OnClick Javascript

You have to write javascipt code to redirect to VF page standard custom button. Should use window.location function to redirect to VF page. Example: {!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')} var accReq = "{!Account.Name}"; if(accReq != '') { window.location="/apex/VisualforceName?id={!Account.Id}"; } else { alert('Name is mandatory'); window.location.reload(); }

Salesforce · Visualforce

Override standard tab to hide recent item and unwanted section

You can customize the standard tab to display specific list view and hide unwanted section. You can't customize the standard tab page using point and click. Need to use Visualforce page to accomplish this functionality. You can use apex:enhancedlist to customize your tab page on standard and custom object. Create Visualforcepage called "AccountOverrideTab" using below… Continue reading Override standard tab to hide recent item and unwanted section

Apex · Salesforce · Visualforce

How to Display Error/Information messages in Visualforce Pages

Many case user want to display multiple error/warning/information message in the UI(Visualforce Page).  Please find below sample code Apex Code : ApexPages.addmessage(new ApexPages.message(ApexPages.Severity.Info, 'Please fill all manfaroty fields.')); ApexPages.addmessage(new ApexPages.message(ApexPages.Severity.Error, 'Name is manfatory.')); ApexPages.addmessage(new ApexPages.message(ApexPages.Severity.WARNING, 'Need more information in order to process your file.')); Visualforce Page: <apex:pageMessages> Note : you can use this logic for… Continue reading How to Display Error/Information messages in Visualforce Pages