Posts

Showing posts from 2013

Know How Much Data Is Occupied By Your Standard Objects/ Custom Objects

Hi Just wanted to share this with you all. Do you know: What are the various record sizes? Knowledge Article Number: 000003631 Description What are the various record sizes? Resolution Most records are 2KB, see the list below for exceptions.. Document storage is separate from data storage and counts at the actual size of the uploaded document. For up to date figures on your company's use of storage please refer to: Setup | Data Management | Storage Usage **** Leads -- 2KB Contacts -- 2KB Accounts -- 2KB Person Accounts - 4KB Opportunities -- 2KB Forecasts -- 2KB Events -- 2KB Tasks -- 2KB Cases -- 2KB Case Team Member – 2KB Solutions -- 2KB Notes -- 2KB Custom Reports -- 2KB Campaigns - 8KB Campaign Members – 1KB Contracts – 2KB Google Docs – 2KB Quotes – 2KB Tags: unique tags – 2KB Custom Objects – 2KB Quote Template Rich Text Data - 2KB Articles - 4KB Email Message - This is dependent upon the content of the messages, a 100kb email message takes 100kb of data storag

Custom Alert Message On Salesforce 'Submit For Approval' Button !?!

Image
Recently I came across a scenario where the business wanted to see the custom message on click of submit for approval button?!? When we understood what was happening on click of the button, It was lot easier for us to implement that. Salesforce.com apps are being used on the web browsers We can identify what is given to the browser by "right-clicking" on the browser element and seeing what the html for that element, like explained below. I recommend you do this before proceeding with the solution. 1) Login 2) Go to a record which has an active approval process. 3) Right click on "submit for approval" button 4) Inspect element (Chrome/ Firefox) or view source (safari/ IE and you have to search for "submit for approval" button tag) There, you will see -- That is just html generated by Salesforce but it has something that we need for this solution. So lets understand that. It has for confirmation-type alert what is conform() and it has g

Invoke Workflow When Only One Field Is Changed!

Image
Hi This is only configuration, but I see people not aware of such thing. We all opt for code not knowing that there are standard ways to do so many things. The following is one of that. Requirement : When Stage of Opportunity is changed , Say, we have to update allowance (text) field. Solution 1 : Write a workflow rule and a field update. Solution 2 : Write a trigger which has the logic for checking if the field value is changed and do some more statements. But there is one problem with Sol 1, i.e., t his runs the FU every time record is changed, if our FU is a complicated formula field we would like to go with apex trigger. But there is standard way. There is one option where we can run these FUs only when the field is changed. And we also can write these formulas for rule criteria. HTH Prabhan

Visualforce Charts with Javascript

Image
Hi All, This post talks about creating CUSTOM CHARTS in visualforce pages with javascript. There are multiple ways to show charts in visualforce pages, such as we could create a report, dashboard and map the image to visualforce page, or use google charts api, or we can use charts tag which is direct and dynamic. Requirement : Embed a chart which shows the salesrep the quarterly Targets and Booked. Solution : It is assumed that we already have the data with the following fields. Q1_Target__cQ2_Target__c Q3_Target__c Q4_Target__c Q1_Booked__cQ2_Booked__c Q3_Booked__c Q4_Booked__c Targets are set by the managers, and Booked are calculated using Rollup summaries on Opportunities. Now that we have the data, lets create a visualforce page with charts. There is this tag <apex:chart> to render data as charts. Please read this link for more information. create a VF page and run the following code. <apex:page standardController="Accoun

Deleting Unwanted Chatter Feeds, An Administrative Tip

Hi I am working on some things on my sandbox. There are system generated chatter feed published all over my page. It is not letting me delete when move my mouse over, so much for the system administrator profile  :). I started searching for answers, But I saw ideas not solutions. I thought of putting it here the workaround I did for myself. There are couple of ways and they are simple. Solution 1 : Logon to workbench, https://workbench.developerforce.com/login.php allow access. Go to SOQL Query, select UserFeed object. It lists out all the fields, select the ones u want to see, ID, Body, type etc., Execute the query. See the result and when u move the mouse onto the id, u can delete the records from the object. Solution 2 : your name>>developer console. There opens up a console window, it has all the tabs like Logs, Heap dumps,...,"Query Editor". Click on Query Editor, U can write an SOQL statement and execute it. Select a row from the query resul

I Have Just Experienced The Power Of Chatter

I just have experienced the power of chatter. Its amazing when people can get addressed when they have problems, isn't it? and its free user license with a limit of 5500 users of course, which is not minimum and can be increased. It took some simple configurations to make it simple. I created a user with License "Chatter External" and profile "Chatter ExternalUser" while that account is being set up, I created a private group "Cusomer Group 1" allowing customers to interact. The user could log in with a different browser, While a CSR is looking for some open Cases in Cusomer Group 1. Now its just the Social media.... Salesforce group has then become a facebook page or something. And the conversation smoothly went on just like expected. Just wanted to share this. What a way to provide service. Go Force Go HTH Prabhan

Salesforce.com Vs Force.com Licenses

Image
Salesforce has recently announced its new force.com pricing list. Click  here  for the notification. The prices look so tempting, don't they? But wait... That licenses wont give you CRM, what they give u is a platform to build your own app (could be your own crm, but think about building it from the scratch, Brahma), though it is great for those who have CRM implemented with SFDC and have a need to provide some users access to only some apps. there are cases. SFDC is only providing horizontals, like CC, Sales, Marketing. It is not providing an ERP solution, but giving u force.com to build your logic. Before going into an example, let us understand what do these different licenses mean ... as given in "sf.pdf" Salesforce Designed for users who require full access to standard CRM and   Force.com   AppExchange   apps. Users with this user license are entitled to access any standard or custom app. Each license provides additional storage for Enterprise and Unlim

FieldSets in Tables

One small tip, but very useful. This is common requirement but I didn't find any post anywhere, so I thought of putting it together. FieldSet is a magical concept which lets the admins take control on visibility of fields on Visualforce. "It doesn't take a developer to add/ remove the fields on visualforce pages" Step 1: Create a fieldset, Select your fields in pagelayout Editor. I grabbed Account name, Site, Description into my set " testfieldset ". Step 2: Create a visualforce page with following code and understand . <apex:page id="pg" standardcontroller="Account" recordSetVar="accts"> <apex:form id="frm1">     <apex:pageBlock mode="maindetail" title="Account List" id="pb1"> <!--         <apex:pageBlockButtons >             <apex:commandButton value="Save" action="{!quicksave}"/>               </apex:pageBloc

Standard Page Buttons To Run Apex Class (not a webservice class)

How do you solve the following requirement, there are lot of ways to do it but we feel this is best for our case. The Requirement : When user clicks on "Close All Cases" custom button on Account Detail Page, It should update status of all the child case records. Fortunately we already have a class that updates the case status to "Closed". all we need to so is call that class. Our Solution : Have a custom field, a small trigger to call that class. Step1: Create a custom checkbox "closecases". Step 2:  Create a custom detail page button "Close All The Cases" and show it on the page layout  with the following code: ================================================ {!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")}   var a = new sforce.SObject("Account"); a.id = "{!Account.Id}"; a.closecases__c=true; var result = sforce.connection.update([a]); // alert(result); window.location.reload(); ==============

JUNCTION OBJECT/ INTERSECTION OBJECT IN SALESFORCE

Image
This post talks about how to create M:M relationship in Salesforce. Salesforce platform has a funny way of maintaining M:M relationship. In general, for many-to-many related objects, everybody would think, when we pick/ map data from one object, the system would create an association and maintain the relationship. But in case of standard page layouts, we will have to create the association link manually. We're gonna see how. Requirement: Cases may have multiple Bugs; Bugs may have multiple Cases. Solution: Create a junction Object. Cool thing to say, heh. But u wont find a junction object anywhere in your set up. Then how would you create it? Please do the steps from the following link, directly from salesforce. https://ap1.salesforce.com/help/doc/en/relationships_manytomany.htm The real thing behind the scenes is that, we are manually creating the record that holds the relationship. Let me put it this way for you. In general, the m:m relationship is dealt in the

When Field Dependency In Visualforce Doesn’t Work!!!

Recently we have come across a strange issue. Requirement : Add two pick list fields, one is controlling field, another is dependent field. Solution: Simple, add two fields within <apex:inputfield> tag, we are done for. No, that doesn't work on a page with 2000 lines of code in between <apex:page> tags and lots of javascript. But, that works on simple page with the following structure. <apex:page id="page" >   <apex:form id="form01">           <apex:pageBlock id="block01" >                           <apex:pageMessages /> <apex:pageBlockSection id="sec01">                         <apex:inputField ……. />  // controlling field                            <apex:inputField …...../> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page> But the problem is that it wouldn't work. The dependent picklist show

OVERRIDE THE STANDARD BUTTON WITH PURE CONTROLLER

This post talks about how to override the standard buttons with pure controller or wizard pages, its a trick that I recently found. The requirement: When we hit the new button from Accounts/ Contacts/ Opportunities it should call same wizard.  Solution One: The Normal way is to create three wizards for overriding respective buttons, like, create a the wizard from the following link  " http://developer.force.com/cookbook/recipe/creating-a-wizard-with-visualforce-pages "  with small modifications, saying -- standardController="Account" extensions="newOpportunityController"  instead of custom controller. and the we would continue to create two more pages to override contacts and opportunities. the solutions looks good but we can save those two pages with this little tweak.  Solution Two: Step 1: Continue creating visualforce page 1 with standad controller and an extension, then go to accounts buttons and links and override the new button with the p

CRM on Cloud

This post talks about Cloud computing in view of CRM implementation. CRM plays a prominent role in all the organizations. There’s no company in the world which doesn’t care about its customers, every organization needs a 360 degree view of their accounts/customers and the account’s activities. CRM does not just manage data or it is not just a Content Management System.  CRM is more about implementing the company’s process over its customer’s data. You can define it in your own terms, but that is what I understood. There are a lot of CRM suites available in the market for CRM implementation. Some of the successful applications before cloud invasion were Oracle Siebel CRM, Sugar, MS Dynamics, SAP CRM, Clarify etc., and Siebel is known for its Database independency and SaaS features.  Even with all these robust applications in market, why did people feel needed? Why did they look out for something new? It’s because implementing CRM in one company is costly, it is so costly that you