
Welcome to SFDC Share Point
Salesforce Blogs
Search
Kapasi Tejas
- Dec 24, 2016
- 1 min
Key Points to Remember for Deployment
There are lot of ways for deploying metadata from one Sandbox to Other or to Production. But there are certain points remember while using change set or Metadata API. Change Set : Change sets can only contain changes that you can make through the Setup menu, and they don’t support every type of component that can be customized. You can’t use change sets to rename or delete a component. When you create a change set, it’s easy to view and add the dependencies to ensure all the
Kapasi Tejas
- Dec 17, 2016
- 3 min
Salesforce Winter ’17 Release Notes
There are really some cool features and enhancements available as part of this release. To look at the Salesforce release guide please find it here, Trailhead is also available for Winter’17 Release. To prepare for Winter’17 Maintenance Exam, Use this Link. Below are some of the features or Enhancements, Capabilities of and considerations when using change sets. New Change Set Component – Global Value Set, A global picklist value set, which is the set of shared values that cu
Kapasi Tejas
- Dec 12, 2016
- 1 min
How to check Person Account are enabled using Apex?
Some time it is needed to check whether this org has person account enabled or not. There are couple of ways we can think of, Using Describe Call boolean isPersonAccount = Schema.SObjectType.Account.fields.getMap().containsKey('isPersonAccount'); – Describe Call count against Governor limits. Accessing field of Account (“isPersonAccount”) boolean isPersonAccount = false;
try{
Sobject accSo = new Account();
accSo.get('isPersonAccount');
//If this field Exists then there is
Kapasi Tejas
- Dec 12, 2016
- 1 min
Efficiently generate Set<Id> from List<SObject>
Let’s check with some examples, Using Map List<sobject> results = Database.query('Select Id From Account Limit 5');
Set<Id> accIds = (new Map<Id,Sobject>(results)).keyset(); In second line we are creating new Map<Id,Sobject> from the results of first line, and then taking the keys from this map. Once this done, heap space is released for this map, and so it is one of the efficient method. One Liner (Without Dynamic SOQL) Set<Id> accIds = (new Map<Id,Account>([Select Id from A
Kapasi Tejas
- Dec 8, 2016
- 1 min
Inner Query in Query Locator Bad Practice
Recently came across one code which had inner query in QueryLocator. For example some one has put that in Start method of Batch apex. To give exact example of Query in Start Method of Batch, global Database.QueryLocator start(Database.BatchableContext BC) {
query = 'Select Id, (Select Id From Attachments) From Account'
return Database.getQueryLocator(query);
} I think this is not the right way of doing query. To get into the reason why, i think this Link will help you
Kapasi Tejas
- Dec 8, 2016
- 1 min
How to get KeyPrefix of sObject in Salesforce
Every record in Salesforce has an ID which is used to uniquely identify the record. Each ID value is globally unique. The first three digits represent the object type. For example, the Account object uses the 001 prefix; the Note object uses the 002 prefix, Contact uses 003, Users 005, Opportunity 006 etc. We can get these prefix values dynamically as well using Apex. To do this, use the below Apex code– Schema.DescribeSobjectResult r = Account.getSobjectType().getDescribe();

Kapasi Tejas
- Dec 3, 2016
- 2 min
Wrapper class and Pagination in Salesforce
This is most commonly used concept in apex. What is the need for wrapper class? It is Inner class which consist of various different properties. For example, if you want to have single container which holds various types of variables or Sobject or Collection. Second Example, Let’s say we want to showcase different opportunity along with Radio button or Checkbox and then by selecting those specific records you want to execute some logic on to this records. For example we have
Kapasi Tejas
- Dec 3, 2016
- 1 min
Action Poller in Visualfoce Page <apex:actionPoller/>
According to SF documentation, It is A timer that sends an AJAX request to the server according to a time interval that you specify. Each request can result in a full or partial page update. Examples : After certain amount of time, you want to perform specific event. From Apex if you want to get continuous status of batch and then you want to execute specific task. If you want to split transactions for doing multiple activities. Document from salesforce is here. Let’s underst

Kapasi Tejas
- Dec 3, 2016
- 1 min
Dynamic Styling in Visualforce Page
This post is about how dynamically you can display the colour of the field on Visual force page. Here is the example below which will showcase all the opportunities in red which are of amount < 100000 and rest would be in Green. You can find the live demo here. <apex:page StandardController="Opportunity" recordSetVar="Opties">
<apex:sectionHeader title="Opportunities"/>
<apex:pageBlock >
<!-- iterate the Opty records -->
<apex:pageBlockTable value="{!Opties}" va
{"items":["5fed4e9b54f2ef00170bb8bd","5fed4e9bfefa7f00175501a8","5fed4e9c89eec30017bba717","5fed4e9e55c8eb00179dd51a","5fed4e9f6d3ebc0017ebf110","5fed4ea0efb4670017a38eec","5fed4ea14410ac00179a2a2a","5fed4ea22b8dbd0017001087","5fed4ea3edd101001701686d","5fed4ea4c998d20017deaebf"],"styles":{"galleryType":"Columns","groupSize":1,"showArrows":true,"cubeImages":true,"cubeType":"min","cubeRatio":2.2857142857142856,"isVertical":true,"gallerySize":30,"collageAmount":0,"collageDensity":0,"groupTypes":"1","oneRow":false,"imageMargin":32,"galleryMargin":0,"scatter":0,"rotatingScatter":"","chooseBestGroup":true,"smartCrop":false,"hasThumbnails":false,"enableScroll":true,"isGrid":true,"isSlider":false,"isColumns":false,"isSlideshow":false,"cropOnlyFill":false,"fixedColumns":0,"enableInfiniteScroll":true,"isRTL":false,"minItemSize":50,"rotatingGroupTypes":"","rotatingCropRatios":"","columnWidths":"","gallerySliderImageRatio":1.7777777777777777,"numberOfImagesPerRow":3,"numberOfImagesPerCol":1,"groupsPerStrip":0,"borderRadius":0,"boxShadow":0,"gridStyle":0,"mobilePanorama":false,"placeGroupsLtr":false,"viewMode":"preview","thumbnailSpacings":4,"galleryThumbnailsAlignment":"bottom","isMasonry":false,"isAutoSlideshow":false,"slideshowLoop":false,"autoSlideshowInterval":4,"bottomInfoHeight":0,"titlePlacement":"SHOW_BELOW","galleryTextAlign":"center","scrollSnap":false,"itemClick":"nothing","fullscreen":true,"videoPlay":"hover","scrollAnimation":"NO_EFFECT","slideAnimation":"SCROLL","scrollDirection":0,"scrollDuration":400,"overlayAnimation":"FADE_IN","arrowsPosition":0,"arrowsSize":23,"watermarkOpacity":40,"watermarkSize":40,"useWatermark":true,"watermarkDock":{"top":"auto","left":"auto","right":0,"bottom":0,"transform":"translate3d(0,0,0)"},"loadMoreAmount":"all","defaultShowInfoExpand":1,"allowLinkExpand":true,"expandInfoPosition":0,"allowFullscreenExpand":true,"fullscreenLoop":false,"galleryAlignExpand":"left","addToCartBorderWidth":1,"addToCartButtonText":"","slideshowInfoSize":200,"playButtonForAutoSlideShow":false,"allowSlideshowCounter":false,"hoveringBehaviour":"NEVER_SHOW","thumbnailSize":120,"magicLayoutSeed":1,"imageHoverAnimation":"NO_EFFECT","imagePlacementAnimation":"NO_EFFECT","calculateTextBoxWidthMode":"PERCENT","textBoxHeight":350,"textBoxWidth":200,"textBoxWidthPercent":50,"textImageSpace":10,"textBoxBorderRadius":0,"textBoxBorderWidth":0,"loadMoreButtonText":"","loadMoreButtonBorderWidth":1,"loadMoreButtonBorderRadius":0,"imageInfoType":"ATTACHED_BACKGROUND","itemBorderWidth":1,"itemBorderRadius":0,"itemEnableShadow":false,"itemShadowBlur":20,"itemShadowDirection":135,"itemShadowSize":10,"imageLoadingMode":"BLUR","expandAnimation":"NO_EFFECT","imageQuality":90,"usmToggle":false,"usm_a":0,"usm_r":0,"usm_t":0,"videoSound":false,"videoSpeed":"1","videoLoop":true,"jsonStyleParams":"","gallerySizeType":"px","gallerySizePx":940,"allowTitle":true,"allowContextMenu":true,"textsHorizontalPadding":-30,"itemBorderColor":{"themeName":"color_12","value":"rgba(232,230,230,1)"},"showVideoPlayButton":true,"galleryLayout":2,"calculateTextBoxHeightMode":"MANUAL","textsVerticalPadding":-15,"targetItemSize":940,"selectedLayout":"2|bottom|1|min|true|0|true","layoutsVersion":2,"selectedLayoutV2":2,"isSlideshowFont":true,"externalInfoHeight":350,"externalInfoWidth":0},"container":{"width":940,"galleryWidth":972,"galleryHeight":0,"scrollBase":0,"height":null}}