Hi ,
Here I am writing some important summer 13 Releases.
Note:From now onwards Customer ,Partner portals are not available,instead of these Salesforce suggests to use communities.
Here I am writing some important summer 13 Releases.
New Classes and Methods from summer
13 Release
System.ScheduleBatch
Method:
Ø
No need to Write Cron Trigger Expression.
Ø
The
new System.scheduleBatch
method is handy for
scheduling a batch job to run once at a future time.
Ø
The
only prerequisite is creating your batch class that implements the Database.Batchable interface.
Ø
You
don’t need to deal with the scheduling details, such as implementing the Schedulable interface or constructing a time
and date (CronTrigger) expression.
Ø
The
System.scheduleBatch method takes the following
parameters.
•
An
instance of a class that implements the Database.Batchable interface.
•
The
job name.
•
The
time interval, in minutes, after which the job should start executing.
•
An
optional scope value. This parameter specifies the number of records that
should be passed into the execute
method.
Ø
Use
this parameter when you have many operations for each record being passed in
and are running into governor limits.By limiting the number of records, you are
thereby limiting the operations per transaction. This value must be greater
than zero. If the start
method returns a
QueryLocator, the optional scope parameter of Database.scheduleBatch can have a maximum value of 2,000. If set to a higher value,
Salesforce chunks the records returned by the QueryLocator into smaller batches
of up to 2,000 records. If the start
method returns an
iterable, the scope parameter value has no upper limit; however, if you use a
very high number, you may run into other limits.
Ex:
String cronID = System.scheduleBatch (reassign, 'job example',
1);
CronTrigger ct = [SELECT Id, TimesTriggered, NextFireTime
FROM CronTrigger WHERE Id =: cronID];
// TimesTriggered should be 0 because the job hasn't started
yet.
System.assertEquals (0, ct.TimesTriggered);
System.debug ('Next fire time: ' + ct.NextFireTime);
// For example:
// Next fire time:
2013-06-03 13:31:23
Additional Sobject.Adderror
method
Ø
New
addError methods have been added with an
additional Boolean argument for sObjects and sObject fields.
Ø
This
additional argument allows you to specify whether or not to escape the custom
error message displayed in the Salesforce user interface.
The API endpoint hostname has changed
from instance-api.salesforce.com
to instance.salesforce.com.
Operators Supported on ID:
Ø
The
less than (<), less or equal (<=), greater than (>)
and greater or equal (>=) comparison operators are now
supported on ID (primary key) fields.
Ø
Previously,
only equals (=), not equals (!=), IN, and NOT IN were supported on ID fields.
Clauses:
UPDATE
VIEWSTAT
Ø
The
new UPDATE VIEWSTAT clause is used in a SELECT statement to report on Salesforce
Knowledge article searches and views. It allows developers to update an
article’s view statistics.
SELECT Title FROM KnowledgeArticleVersion WHERE
PublishStatus='online' UPDATE
VIEWSTAT;
FOR VIEW AND FOR
REFERENCE SOQL CLAUSES:
Ø
A
record is considered viewed when the user sees the details associated with it,
but not when the user sees it in a list with other records.
Ø
A
record is considered referenced when a related record is viewed. You can use
these clauses when objects are viewed in a custom interface, such as a mobile
application or a custom page.
This is an example of a SOQL query that retrieves one contact
to show to the current user and uses FOR VIEW to
update the last viewed date of the retrieved contact. The same statement both
retrieves the record and updates its last viewed date.
SELECT Name, ID FROM Contact FOR VIEW LIMIT 1
This is an example of a SOQL query that retrieves a contact
and uses FOR REFERENCE
to update the LastReferencedDate field of the retrieved contact.
The same statement both retrieves the record and updates it’s last referenced
date value.
SELECT Name, ID FROM Contact FOR REFERENCE LIMIT 1
Workflow:
Ø
Administrators
now add workflow time triggers based on Contract Fields like Contract: EndDate,
Contract: Activated Date.
Example:
Send an email reminder to the renewal manager 20 days before a
contract’s end date.
TestMethods:
Ø
Starting
in Summer ‘13, test methods can be defined only in test classes (classes
annotated with @isTest). You can no longer add a test
method in a non-test class. This change applies to new Apex code saved using
Salesforce.com API version 28.0 and later. Apex code saved using earlier API
versions isn’t affected.
Ø
Asynchronous
calls are typically enclosed within Test.startTest and
Test.stopTest statements
in test
methods so that they execute after Test.stopTest.
Ø
In
this case, mock callouts can be performed after the asynchronous calls and no
changes are necessary.
Ø
But
if the asynchronous calls aren’t enclosed within Test.startTest and
Test.stopTest statements, you’ll get an
exception because of uncommitted work pending.
To prevent this exception
Enclose the
asynchronous call within Test.startTest and
Test.stopTest statements.
Test.startTest ();
MyClass.asyncCall ();
Test.stopTest ();
Test.setMock (..); // Takes two arguments
MyClass.mockCallout ();
Follow the same
rules as with DML calls:
Enclose the portion of your code that performs the callout
within Test.startTest and Test.stopTest statements.
The Test.startTest statement must appear before the
Test.setMock statement.
Also, the asynchronous calls must not be part of the Test.startTest/Test.stopTest
block.
MyClass.asyncCall ();
Test.startTest ();
Test.setMock (..); // Takes two arguments
MyClass.mockCallout ();
Test.stopTest ();
TestVisible Annotation:
Use the TestVisible
annotation to allow
test methods to access private or protected members of another class outside
the test class. These members include methods, member variables, and inner
classes. This annotation enables a more permissive access level for running
tests only.
This annotation doesn’t change the visibility of members if
accessed by non-test classes.
Force.com Apex Code With this annotation, you don’t have to
change the access modifiers of your methods and member variables to public if you
want to access them in a test method.
Sandbox
templates:
Ø
Sandbox
templates provide control over the objects copied to your sandbox. You create a
sandbox template that defines the object data you want in your sandbox.
Ø
When
you create or refresh a Full sandbox, you’ll have the option to use your
sandbox template.
Ø Sandbox templates are only
available for use with a Full sandbox.
Ø
Custom
Settings data is now copied to Developer and Configuration Only sandboxes.
Previously,
Custom Settings data was only copied to Full sandboxes.
Change Sets:
Ø
Approval
processes are now available in change sets and are exposed in the Metadata API.
Approval processes are not supported in managed or unmanaged packages.
Ø
Auto-Response
Rules and Escalation Rules are now available in change sets. However, these are
not supported in managed or unmanaged packages.
Ø
Assignment
Rules are now available in change sets. However, these are not supported in
managed or unmanaged packages.
New Visualforce
Components:
Ø
The
support: clickToDial component lets you add a phone
field to custom Visualforce detail and edit pages. When user in organizations
with Open CTI or Salesforce CRM Call Center click on the phone field, the phone
number is dialed automatically and connects to the SoftPhone.
Ø
Chatter:
userPhotoUpload that
lets users upload a photo to their Chatter profile page. Using this Visualforce
component, you can create a custom page that lets users in your Ideas community
upload a profile picture in either a cropped format or as a full image.
Formulas:
Ø
Returns
a true or false value. The field appears as a checkbox in record detail pages
and reports. Use True for checked values and False for unchecked values.
Ø
The
Owner lookup and made its fields
available for cross-object formulas.
Ø
For
example, if you need owner email and you don’t use queues; your formula would
be Owner:User.Email. If you do use queues, your
formula could be
IF
(ISBLANK (Owner: User. Id), Owner: Queue.QueueEmail, Owner: User. Email)
Record Types in Permission
Sets:
Ø
You
can use permission sets to assign custom record types to users. With record
types in permission sets, you have the flexibility to layer record type
assignments to users as needed, without having to create additional profiles.
Ex:
Suppose you have 20 Tier 2 customer support representatives.
When these representatives create a case, they usually use the default Tier 2
record type and page layout. However, two of the representatives also need to create
cases with a Defect Cases record type, another two also need to create cases
with the Global Issues record type, and one more needs to create cases with either
the Global Issues or Defect Cases record type.
In the past, granting this type of access would mean creating
four profiles.
• Tier 2 (15 users)
• Tier 2 with Defect Cases (2 users)
• Tier 2 with Global Issues (2
users)
• Tier 2 with Defect Cases and
Global Issues (1 user)
But with summer ’13, you can create just one profile and two
permission sets to accomplish the same requirement.
• Tier 2 profile (20 users)
• Defect Cases permission set (3
users)
• Global Issues permission set (3
users)
Reports
and Dashboards:
Reports and dashboards are shared through folders. You share
the folder, not the report or dashboard itself. To let others work with your
report or dashboard, give them Viewer, Editor or Manager access to the folder
where the report or dashboard is stored.
From Setup, click Reports & Dashboards > Folder
Sharing.
2. Select Enable
Analytics Sharing.
3. Click Report
and Dashboard Folder Sharing.
Governor Limits:
Ø
The
maximum number of Apex jobs that can be scheduled concurrently has increased
from 25 to 100.
Ø
Limit
for Batch Apex, scheduled Apex, and future methods has the 250,000 method
executions or the number of user licenses in your organization multiplied by
200.
Ø
SOSL
now supports up to 2000 results for each query instead of the previous limit of
200 results per query.
Ø
The
maximum size for a SOSL query has been increased to 20,000 characters.
Ø
The
maximum size for a SOQL query has been increased to 20,000 characters.
Ø
Configurable Timeout for JavaScript Remoting
Requests changes from 30 sec to 120 sec.
Note:From now onwards Customer ,Partner portals are not available,instead of these Salesforce suggests to use communities.
0 comments:
Post a Comment