Developer Console Shortcuts > Indentation - Very Very Important Select all your code using Cmd/Ctrl + A then press Shift + Tab. Thats All! > Opening Execute Anonymous - Cmd/Ctrl + E
Clicks around our appartment Random clicks around our Appartment @ Vizag > Camera Details Camera: Canon 600D Lens: 18 - 55 mm
Test Classes for Standard/StandardSet Controllers Following are basic steps we wonder while writing test classes, please find each code statement explained using comments Order is Very important here first you need to create visualforce page then controller/extension // setting visualforce page PageReference pageRef = Page.<<Vf_page_name>>; Test.setCurrentPage(pageRef); // putting
send Custom email using using Apex Salesforce As sending custiom Email is widely used in almost all Organsations, here is an utility class that mostly satisfy needs. This Utils class helps you in, 1. Validate email address using method isValidEmailAddress 2. Send Email using Standard Attachments(attachments in attachments related lsit) using method sendEmailWithStandardAttachments. Here we pass
File Preview in Vf Pages like Chatter File Preview File prevew uses latest flash player, if you're browser have latest it shows with no errors if not it will prompts to install. So here is Visualforce code <div> <embed src="/_swf/190003/sfc/flex/DocViewer.swf" flashvars="shepherd_prefix={!$Site.Prefix}
Identify SObject Name with Record Id Ever wondered how to find Salesforce Object name with Record Id? Here is solution, // pass record Id for which you want to find sObject Name Id recordId = 'a099000000h6Nw9'; // recordId.getSObjectType() is responsible for getting sObject Name system.debug(recordId.getSObjectType()); Happy Coding!!!
send email using standard Email Templates using Apex Salesforce At times we need to send email alerts using standard email templates using Apex, where these templates are used in Workflow email alerts. Salesforce provides an Class SingleEmailMessage to send emails using Apex Please check following code statements on how to initiate class & invoke for sending emails Messaging.SingleEmailMessage
Accordion display using Visualforce + Bootstrap Wondering what is Bootstrap?, Its a library which contains css/stylesheets, scripts, svg files, fonts etc There are two ways to use bootstrap in Visualforce pages 1. uploading bootstrap zip as static resources 2. using CDN's (used in this post) Here we go, steps for bulding a accordion
@mention using ConnectApi To @ mention using HttpCallouts check out my post [https://blog.thephani.com/mention-chatter-groups/] Another way to @mention would be using Chatter REST API as follows > Use Case: Posting an @mention to a User Profile Feed > Methods Used: ConnectApi.ChatterFeeds.postFeedItem String communityId = null; // community whih may be customer/
Show PageBlockSection Collapsed by Default Do You Have PageBlockSections within your page? but want them to be collapsed by default? Here we go! lets say, you have a pageblock section as shown <apex:pageBlockSection title="Section" id="Sec1"> <apex:outputLabel title="Testing in progress" value="