Wednesday, February 19, 2014

How To Reset New Password in Salesforce Using Apex

3) How To Reset New Password in Salesforce Using Apex.

Ans:

L
List<user> u= new list<user>();
list<id> ids= new list<id>();
string test='test';
u=database.query['select id,name from user where name=:'test'];
for (user usr: u)
{
System.resetpassword(user.id,true);
}

ListL

Lead Conversion Using Apex Classes

2)Hi Today, We Will See How To Convert Lead Using Apex Class

Ans:

public class LeadConvertclass{
    public static void doConvert(Id leadId){

        Database.LeadConvert lc = new database.LeadConvert();
        lc.setLeadId(leadId);
        lc.setDoNotCreateOpportunity(True);

        LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true LIMIT 1];
        lc.setConvertedStatus(convertStatus.MasterLabel);
        Database.LeadConvertResult lcr = Database.convertLead(lc);
    }
}

Tuesday, February 11, 2014

What is report builder and How to create report builder in our salesforce

Answers:
Report builder is a visual editor for reports. The report builder screen lets you work with report fields and filters, and shows you a preview of your report with just some of the data.

To optimize screen real estate, report builder uses a compressed page header. To view your application tabs, simply close the builder or click the Salesforce logo.
The Fields pane displays fields from the selected report type, organized by folder. Find the fields you want using the Quick Find search box and field type filters, then drag them into the Preview pane to add them to the report.
Create, view, edit, and delete custom summary formulas and bucket fields in the Fields pane as well.
In the joined report format, the Fields pane displays fields from all report types added to the report, organized by report type.
Filters Pane
Set the view, time frame, and custom filters to limit the data shown in the report.
Preview Pane
The dynamic preview makes it easy for you to customize your report. Add, reorder, and remove columns, summary fields, formulas, groupings, and blocks. Change the report format and display options, or add a chart.
The preview shows only a limited number of records. Run the report to see all your results.