Skip to main content

Posts

How to track Organization’s Custom Object Usage by User License Type ?

Hi All, We can generate a report to keep track on custom object usages in the ORG. 1. Creating Report Type. 2. Create Report using report type. Set up- Create--Report Type-- New.

Enabling association of multiple accounts to a particular contact

Hi All, As part of summer 16 release SFDC lunched a cool feature, Allow users to relate a contact to multiple accounts . Now contacts are not necessarily to be linked to one Account, it can be multiple account based on different different role. Demo - http://salesforce.vidyard.com/watch/fxqHZf2pER29kXRYvkwio3 Link to refer more info  - https://help.salesforce.com/articleView?id=shared_contacts_set_up.htm&language=en_US&type=0 How can we show in visualforce page ?   <apex:page standardController="Account">   <apex:detail relatedList="false"/>   <apex:relatedList list=" AccountContactRelations "/> </apex:page>    on the Account page one new related list (Related Contacts) will get introduced. <apex:page standardController="Contact">   <apex:detail relatedList="false"/>   <apex:relatedList list=" AccountContactRelations "/> </apex:page> on th...

How to avoid hard coded record type id from Validation rule ?

Hi All, It is not best pratice to use hard coded id value in validation rule or in any formula field logic, because ID value will keep on changing form environment to environment. if we use hard coded id then it will cause lot of maintenance activity. Here is an example where hard code Id value is being used and how to achieve without using hard code value. AND( ISBLANK(CustomField__c ),  RecordTypeId ='0124B0000004aZ4',  OR(ISPICKVAL(Type, 'New'),  ISPICKVAL(Type, 'Reserved')),  NOT($Profile.Name ='Integration Admin')) Instead of recordtypeid it is better to use Recordtype.developername. AND( ISBLANK( CustomField__c ),  RecordType.DeveloperName ='Marketing_Event',  OR(ISPICKVAL(Type, 'New'),  ISPICKVAL(Type, 'Reserved')),  NOT($Profile.Name ='Integration Admin'))

How to find total number of records of each object in salesforce ?

Hi All, Sometimes we are asked to share total number of records of each object and what percentage it is increasing. Salesforce is so smart, Login-->Set up-->Data Management-->Storage Usage

How to tab Order for the fields in visualforce page?

We can use the attribute  tabOrderHint of visualforce page to control tab order. <apex:inputField   value= "{!Account.AnnualRevenue}"   tabOrderHint= "1" / > <apex:inputField value="{! oppyContact.Contact_Street_Address__c}" tabOrderHint="1"/> <apex:inputField value="{! oppyContact.Contact_Country__c}" tabOrderHint="3"/> <apex:inputField value="{! oppyContact.Contact_State_Province__c}" tabOrderHint="2"/>                      <apex:inputField value="{! oppyContact.Contact_Zip_PostalCode__c}" tabOrderHint="4"/>

How to use Field Set in Page and in Controller

Sometimes we  don't know which fields should be displayed in the page and which field should be added in the query. To solve this issue and make it salable SFDC has given cool features called Field set. This post will share some code snippet about using field set in the page and in controller. In the page <apex:repeat value="{!$ObjectType.Lead.FieldSets.Update_Fields_FieldSET}" var="f">             <apex:inputField value="{!leadTemp [f]}"/><br/>       </apex:repeat> Public Lead leadTemp {get;set;} In the apex class String sQuerry = 'Select id,GEO__c,Is_Locked__c,';        for(Schema.FieldSetMember f : SObjectType.Lead.FieldSets.Update_BDR_Activity_Fields.getFields()) {                 sQuerry = sQuerry+f.getFieldPath()+',';                            }     ...