Skip to main content

Posts

VisualForce Charting in Salesforce

As salesforce has given us the functionality of report and dashboard to create chart then what is the use of visualforce charting?. In some situations existing functionality of salesforce can not meet our requirement properly . Suppose there is a requirement to compose custom pages that combine charts and data tables in ways that are more useful to our organization.In that case visual force charting is useful.There are also other way to meet this requirement. We can use Google chart Api for this.In my previous post I have explained. Visualforce  charting gives you an easy way to create customized business charts, based on data sets you create directly from SOQL queries, or by building the data set in your own  Apex code. By combining and configuring individual data series, you can compose charts that display your data in ways meaningful to your organization. Visualforce  charts are rendered client-side using JavaScript. This allows charts to be animated and visual...

Exploring all chart in Visualforce page by using JavaScript Remoting & Google Charts API.

This post is all about how to draw a chart in Visual force page by using JavaScript Remoting & Google Charts API. I had faced some requirement to draw a different types of chart in a visualforce page and also to display number of  distinct record for further reference. I had done some work around and finally I had reached to the final destination. Here I have created one object  ChartObject__c and two field Name and Amount . Here I am sharing some code snippet for your reference.  <apex:page controller="GoogleChartsController" sidebar="false">     <!-- Google API inclusion -->     <apex:includeScript id="a" value="https://www.google.com/jsapi" />     <apex:sectionHeader title="Google Charts + Javascript Remoting" subtitle="Demoing - Opportunities by Exepected Revenue"/>           <!-- Google Charts will be drawn in this DIV -->     <div id="chartB...

Uses Of Apex Repeat

An iteration component that allows you to display the contents of a collection according to a structure that you specify. The collection can include up to 1,000 items. This component cannot be used as a direct child of the following components: <apex:dataTable> <apex:pageBlockTable> <apex:panelBar> <apex:selectCheckboxes> <apex:selectList> <apex:selectRadio> <apex:tabPanel> Suposse there is a requirement, you need to display Five accounts with thier Contacts in a visualforce page.Format should be like this image How will you do it? It is very simple, just use repeat in visualforce page. Here is visualforce page and controller <apex:page controller="UseofRepeatOnAccountController" sidebar="false" tabStyle="Account">     <apex:form >     <apex:pageBlock title="Accounts with assoicated Contacts">         <apex:repeat value="{!accountList }" var="acc">        ...

Generating pdf Using Conga Composer

Conga Composer lets you to create documents from a button or link placed on a Salesforce.com page layout. It merges Salesforce.com data with Word, Excel, PowerPoint, email, or PDF templates to create finished documents. Benefit Of Conga Composer Easily create and deliver customized documents,  Presentations and reports using Word, PowerPoint, Excel, HTML email and PDF forms from standard & custom objects.  Generate quotes, proposals, account plans, invoices, contracts, letters & more. In order to use  Conga Composer , we need to install two things.     Conga Composer      Conga Query Manager. If we need to use some related object's record then Conga Query Manager is necessary otherwise Conga Composer is enough. How to Install Conga Composer Go through this link for installation . http://knowledge.appextremes.com/appextremes/ext/kb110-how-to-install-conga-composer How to Install Conga Query Manager Go through t...

LIKE Operator In Salesforce

The LIKE operator in SOQL and SOSL is quite similar to the LIKE operator in SQL; it provides a mechanism for matching partial text strings and includes support for wildcards. Suppose we need to delete some test records of Account object, all test records are created having account name is test. Account name may "testasish" or "accounttest", how can we get those record by Soql query ? For this propose LIKE operator is useful. For example  List<Account> listOfAccounts; listOfAccounts = [SELECT id, Name                            FROM Account                            WHERE Name   LIKE '% test% ' ]; This query matches both testasish,accounttest, and test. Use Cases Of LIKE Operator The % and _ wildcards are supported for the LIKE operator. The % wildcard matches zero or more characters. The _ wildcard matches exactly ...

Summer13 Release Notes For Exam

Hi Guys  Today I have cleared Summer13 release exam , Now I am sharing some important topic for your help. Before going for the exam make sure that you know about Salesforce Communities , Force.com canvas, New formula Return Type ,  Restrict to Visitors to Site ,   Sandbox template . Improved Setup user interface and Enhanced Report and Dashboard Folder Sharing. Please go through this only once You will find all the questions from this only.The text which are red are most important one.     Improved Setup user interface The setup menu items are organised into goal-based categories Administrators can enable or disable the new setup user interface at any time . Personal settings, which all   salesforce.com   users can edit, are available in a separate “My Settings” menu. To access “My Settings”, click your name at the top of any Salesforce page, then click “My Settings”.   Salesforce Communities Now any company can creat...

Creating Test Class to Cover RecordType

Hello  I have come across many times this question how to cover record type in test class,This made me to share in  my blog.Here is the code you can refer for example : let say we have two Contact Record Types PrimaryContact and BusinessContact. Now  we can create Contact record by using these recordtype  such as PrimaryContact  or BusinessContact . There are two different approach. First Approch   We normally query like this .      RecordType rt = [SELECT id,Name                               FROM RecordType                               WHERE SobjectType='Contact ' AND Name='PrimaryContact ']; And now use this value further while creating the Contact Record.    Contact con = new Contact (Name='TestConatct' , recordTypeId=rt.id);    INSERT con; ...