Sunday, April 27, 2014

What is Aggregate Functions in SOQL?

What is  Aggregate Functions in SOQL? Aggregate functions in SOQL, such as SUM() and MAX(), allow you to roll up and summarize your data in a query. You can use aggregate functions without using a GROUP BY clause. For example, you could use the AVG() aggregate function to find the average Amount for all your opportunities. AggregateResult[] groupedResults  = [SELECT AVG(Amount)aver FROM Opportunity];Object avgAmount = groupedResults[0].get('aver'); So the functions count(fieldname), count_distinct(), sum(), avg(), min() and max() return an AggregateResult object (if one row is returned from the query) or a List of AggregateResult objects (if multiple rows are returned from the query). You access values in the AggregateResult object...

Friday, April 25, 2014

What is Opportunity Contact Role?

What is Opportunity Contact Role? Opportunity Contact Role represents the role of Contact/Person account on an Opportunity. There is many-to-many relationship between Opportunity and Contact, through a junction object  alled OpportunityContactRole. In an opportunity, you may add many opportunity contact roles. There is no restriction on Account from which the Contact can come, you can add any Contact from any Account. For example, Srinivas Balle might be the Executive sponsor for the opportunity “Universal Container”, and Edna Frank  might be the Quality Control for same Opportunity. How...

Thursday, April 24, 2014

How to get Maps from SOQL Query in salesforce?

How to get Maps from SOQL Query in salesforce? As we all know, Apex code has limitation of  Number of code statements that can be executed. While writing Apex code, we should take care of number of code statement that are  executed to avoid governor limits. It is useful to understand how to reduce the number of executed code statements so that we can stay within the governor limits.Normally we get list of records in a SOQL query.Sometime we also need set of id’s or map of record id’s and record or list of record id’s.Apes code for above requirement will be as below: //Creating List of all account IdsList<id> accIdsList = new List<id>() ;//Creating set of all account IdsSet<id> accIdsSet = new Set<id>() ;//Creating Map with account id as key and account...

Tuesday, April 22, 2014

What are the Standard List Controller Actions?

What are the Standard List Controller Actions? Action methods perform logic or navigation when a page event occurs, such as when a user clicks a button, or hovers over an area of the page. Action methods can be called from page markup by using {! } notation in the action parameter of one of the following tags: • <apex:commandButton> creates a button that calls an action • <apex:commandLink> creates a link that calls an action • <apex:actionPoller> periodically calls an action • <apex:actionSupport> makes an event (such as “onclick”, “onmouseover”, and so on) on another, named component, call an action • <apex:actionFunction> defines a new JavaScript function that calls an action • <apex:page> calls an action when the page is loaded The following...

Monday, April 21, 2014

What is Standard List controller in Salesforce?

What is Standard List controller in Salesforce? Or What is Standard List controller in Visuaforce? Standard list controllers allow you to create Visualforce pages that can display or act on a set of records. Examples of  work with a set of records include list pages, related lists, and mass action pages. Standard list controllers can be used with the following objects: • Account • Asset • Campaign • Case • Contact • Contract • Idea • Lead • Opportunity • Order • Product2 • Solution • User • Custom objects For example, to associate a page with the standard list controller for accounts, use the following...

Sunday, April 20, 2014

Checking for Object Accessibility in Visualforce page.

Checking for Object Accessibility in Visualforce page. If a user has insufficient privileges to view an object, any Visualforce page that uses a controller to render that object will be inaccessible. To avoid this error, you should ensure that your Visualforce components will only render if a user has access to the object associated with the controller. You can check for the accessibility of an object like this: {!$ObjectType.objectname.accessible} This expression returns a true or false value. For example, to check if you have access to the standard Lead object, use the following code: {!$ObjectType.Lead.accessible} For custom objects, the code is similar: {!$ObjectType.MyCustomObject__c.accessible} where MyCustomObject__c is the name of your custom object. <apex:page...

Saturday, April 19, 2014

How to Render data into MS-Execl using Visualforce?

How to Render data into MS-Execl using Visualforce? Here i am sending particular account related contact detail to MS-Execl, for this you need mention content-type attribute in <apex:page> tag. Here is the Example. <apex:page standardController="Account" sidebar="false" contentType="application/vnd.ms-excel#sfdcsrini_Excel.xls" cache="true">      <apex:pageBlock title="Hello {!$User.FirstName}!">       You are viewing the {!account.name} account.    </apex:pageBlock>    <apex:pageBlock title="Contacts">       <apex:pageBlockTable value="{!account.Contacts}" var="contact">          <apex:column value="{!contact.Name}"/>        ...

Friday, April 18, 2014

How to Generate MS-Word document using VF pages?

How to Generate MS-Word document using VF pages? I have a VF which renders as MS-Word. for this you need to mention content type in <apex:page> tag.  EX:- <apex:page standardController="Account"  contentType="application/msword#sfdcsrini.doc" cache="true"> <html xmlns:w="urn:schemas-microsoft-com:office:word"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <body> <apex:outputText title="Welcome to word" value="{!$User.FirstName}"/> <br/> <br/> <apex:pageBlock > <div style="text-align:left" > <b>Account Name :</b><apex:outputText value="{!account.name}"/><br/> <b>Account Number: </b><apex:outputText value="{!account.AccountNumber}"/><br/> </div> ...

Creating Word Templates for Conga Composer

Creating Word Templates in Conga Composer ...

Thursday, April 17, 2014

How to Read CSV file from Apex?

How to Read CSV file from Apex display in visualforce? I recently had to develop a Visualforce page that allowed a Salesforce user to upload a CSV file and then generate some records from the parsed values. Yes, I know that is what the Data Loader is for, but the intended user here was not technically adept. And I thought it was an interesting experiment. Visualforce page: csvuploadVF <apex:page sidebar="false" controller="FileUploader">    <apex:form >       <apex:sectionHeader title="Upload data from CSV file"/>       <apex:pagemessages />      ...

Conga Composer Quick Start 3: Creating a Complete Conga Composer Solution

Conga Composer Quick Start 3: Creating a Complete Conga Composer Solution ...

Wednesday, April 16, 2014

Tuesday, April 15, 2014

Conga Composer Quick Start 1

Conga Composer Quick Start 1 ...
Page 1 of 10312345Next

 
| ,