Tuesday 29 August 2017

Pagination with a List Controller

You can add pagination to a page using a list controller by utilizing the next and previous actions. For example, if you create a page with the following markup:


<apex:page standardController="Account" recordSetVar="accounts">
   <apex:form >
   <apex:pageBlock title="My Accounts">
   <apex:pageBlockSection >
   <apex:dataList value="{!accounts}" var="a">{!a.name}
    </apex:dataList>
   </apex:pageBlockSection>
   <apex:panelGrid columns="2">
   <apex:commandLink action="{!previous}">Previous</apex:commandLink>
   <apex:commandLink action="{!next}">Next</apex:commandLink>
   
   </apex:panelGrid>
   </apex:pageBlock>
   </apex:form>    
</apex:page>


<apex:dataList>

An ordered or unordered list of values that is defined by iterating over a set of data. The body of the <apex:dataList>component specifies how a single item should appear in the list. The data set can include up to 1,000 items.

By default, a list controller returns 20 records on the page. To control the number of records displayed on each page, use a controller extension to set the pageSize.



Limits in Salesforce

In Trigger and Apex class sales force provide us some limits. Below are the limits.

You can take idea what Salesforce provide us limits.


Limits in Trigger:

1.Number of SOQL queries:  100

2.Number of query rows(records):  50000

3.Number of SOSL queries: 20

4.Number of query rows(records):  2000

5.Number of DML statements: 150

6.Number of DML rows:  10000

7.Maximum CPU time:  10000

8.Maximum heap size: 6000000

9.Number of callouts:  100

10.Number of Email Invocations:  10

11.Number of future calls:  50

12.Number of queueable jobs added to the queue: 50

14.Number of Field one Per Object:  500

15.Number of Relationship Fields:  40

16.Number of Active Workflow on per object:  50

17.Number of Workflow on per objects:  500

18.Number of Approval Process on per object:  500

20.Number of Active Lookup Filters:  5

21.Number of Active Validation Rules:  100

22.Number of VLOOKUP on per object:  10

23.Number of Sharing Rules (Both Owner- and Criteria-based):  300

24.Number of Sharing Rules (Criteria-based Only): 50


Limits In Salesforce:

Feature

Personal Edition

Contact Manager

Group Edition

Professional Edition

Enterprise Edition

Unlimited and Performance Edition

Developer Edition

Action plans: maximum tasksN/A75
Active lookup filters5 per object
Active validation rules per objectN/A20100500100
Attachments: maximum size in the Notes & Attachments related list125 MB for file attachments. 2 GB for feed attachments.
Categories: maximum default categories and hierarchy levelsN/A
  • 100 categories in a data category group
  • 5 levels in a data category group hierarchy
Category groups: maximum default5 category groups, with 3 groups active at a time
Certificates: maximum50
Content deliveries: default delivery bandwidth per rolling 24-hour window20 GB
Content deliveries: default delivery view counts per rolling 24-hour window20,000
Content deliveries: maximum file size for online viewing25 MB
Content: maximum file size
  • 2 GB
  • 2 GB (including headers) when uploaded via Chatter REST API
  • 2 GB (including headers) when uploaded via REST API
  • 38 MB when uploaded via SOAP API
  • 10 MB when uploaded via BULK API
  • 10 MB for Google Docs
  • 10 MB when uploaded via Visualforce
Content: maximum libraries2,000
Content: maximum number of documents30,000,000
Content: maximum number of documents and versions in a 24–hour period (adjustable)200,0002,500
Content packs: maximum filesN/A50
Custom apps2N/A1255
To exceed this limit, contact Salesforce.
260
To exceed this limit, contact Salesforce.
Unlimited10
Custom fields per object3525100500800500
Custom labelsN/A5,000
Custom links: maximum label length1,024 characters
Custom links: maximum URL length3,000 bytes4
Custom objects5N/A5502002,000400
Custom objects: deletion of parent records in a many-to-many relationshipN/AAvailable unless more than 200 junction object records are associated with the deleted parent record and the junction object has a roll-up summary field that rolls up to the other parent.
Custom objects: maximum master-detail relationships26
Custom permissionsN/A1,000
Custom profiles: maximumN/A21,500 per user license type
Custom settings: cached data limitThe lesser of 10 MB or 1 MB multiplied by the number of full-featured user licenses in your org (N/A in Contact Manager and Professional Editions)
Custom settings: maximum fields per setting5N/A100N/A300
Divisions: maximumN/A100N/A
Documents: maximum size of custom app logo20 KB
Documents: maximum size of document to upload5 MB
Documents: maximum size of file name (with extension)255 characters
Entitlement processes and milestonesN/AYou can create up to 1,000 entitlement processes total, with up to 10 milestones per process. If your org was created before Summer ’13, its maximum entitlement processes can be lower. Contact Salesforce to increase it.
External objects7N/A100
Field history tracking: maximum standard or custom fields tracked for standard or custom objectsN/A20
File size: maximum in Chatter and on the Files tab2 GB
Fiscal years: maximum custom250
Formulas: maximum displayed characters after an evaluation of a formula expression1,300
Formulas: maximum length3,900 characters
Formulas: maximum size when compiled5,000 bytes
Formulas: maximum size when saved4,000 bytes
Formulas: unique relationships per object15
Formulas: VLOOKUPfunctions per object10
Ideas: maximum size of HTML idea commentN/A4 KB
Ideas: maximum size of HTML idea description32 KB
Lightning AppsN/A1025UnlimitedN/A
Lightning pages: maximum components in a region25
Master-detail relationship: maximum child records10,0008
Objects: maximum number of deleting combined objects and child records100,000
Omni-Channel: maximum pending routing requests9N/A30,000
Omni-Channel: maximum queued work items105,000 per hour
Opportunity Teams: maximum membersN/A30
Permission sets: maximum (created)N/A1101,000
Permission sets: maximum (created and added as part of an installed managed AppExchange package)N/A1,500
Question: maximum charactersN/A1,000N/A
Question: maximum characters (with Chatter Answers Optimize Question Flowenabled)32,000
Quote PDF: maximum logo heightN/A150 pixels
Quote PDF: maximum logo size5 MB
Recycle Bin: maximum records25 times your storage capacity in MBs
Reply: maximum charactersN/A1,000N/A
Reply (private): maximum characters (with Chatter Answers Optimize Question Flowenabled)4,000N/A
Reply (public): maximum characters (with Chatter Answers Optimize Question Flowenabled)32,000N/A
Shared ActivitiesYou can relate up to 50 contacts to nonrecurring tasks, nongroup tasks, and nonrecurring events. You can assign one primary contact. All others are secondary contacts.
Sharing rulesN/AYou can create up to 300 sharing rules per object, including up to 50 criteria-based rules.
Static resourcesN/AA static resource can be up to 5 MB. An org can have up to 250 MB of static resources total.
Tabs2351,210
To exceed this limit, contact Salesforce.
1,225
To exceed this limit, contact Salesforce.
1,225
To exceed this limit, contact Salesforce.
100
Tags
A user is limited to a maximum of:
  • 500 unique personal tags
  • 5,000 instances of personal tags applied to records
Across all users, your org can have a maximum of:
  • 1,000 unique public tags
  • 50,000 instances of public tags applied to records
  • 5,000,000 instances of personal and public tags applied to records
Territories: maximum account assignment rulesN/A15
Users: maximum created1510Unlimited2
Users: maximum created (Chatter Free)N/A5,000
Visual WorkflowN/AEach flow can have up to:
  • 50 versions
  • 2,000 steps
Each org can have up to:
  • 500 active flows
  • 1,000 flows total
  • 30,000 waiting interviews at a given time
  • 1,000 events processed per hour
  • 20,000 defined relative alarm events across all flows and flow versions
Web-to-Case: maximum new cases generated in a 24–hour periodN/A5,00011
Web-to-Lead: maximum new leads generated in a 24–hour period50011

One particular lead takes how many days to change it's stage from one stage value to another

/*************** Ceated By    : Mohit Dwivedi( KVP Business Solution Pvt Ltd) . Created Date :  Purpose      : This  controller is for Lead ...