Previously we have seen the Transform Operations using CSS3. In this article i will depict the New Border Properties in CSS 3. With the help of CSS 3, we can perform following two operations on border :
- Rounded Corner/ Border
- Border Shadow
May 16th, 2012
jitendra Previously we have seen the Transform Operations using CSS3. In this article i will depict the New Border Properties in CSS 3. With the help of CSS 3, we can perform following two operations on border :
May 6th, 2012
jitendra Push technology is a model of Internet-based communication in which information transfer is initiated from a server to the client. Also called the publish/subscribe model, this type of communication is the opposite of pull technology in which a request for information is made from a client to the server. The information that’s sent by the server is typically specified in advance. When using Streaming API, you specify the information the client receives by creating a PushTopic. The client then subscribes to the PushTopic channel to be notified of events that match the PushTopic criteria.
In push technology, the server pushes out information to the client after the client has subscribed to a channel of information. In order for the client to receive the information, the client must maintain a connection to the server. Streaming API uses the Bayeux protocol and CometD, so the client to server connection is maintained through long polling.
The Bayeux protocol and CometD both use long polling.
There is nice jQuery plugin available on web which implements Bayeux protocol and CometD.
Navigate here for Salesforce documentation for Streaming API.
Common Terms used in Streaming API:
Example used in this article :
I want notifications about all opportunity whose status is won.
First step to implement any streaming API is to create the Push Topic, which is going to subscribed by all the clients.
Create PushTopic:
To create PushTopic, we will need the developer console of the Salesforce and assume that the name of the topic is “WonOpportunity”.
PushTopic pushTopic = new PushTopic();
pushTopic.ApiVersion = 23.0;
pushTopic.Name = 'WonOpportunity';
pushTopic.Description = 'Notify if the Opportunity won';
pushTopic.NotifyForOperations = 'All';
pushTopic.NotifyForFields = 'Referenced';
pushtopic.Query = 'Select o.OwnerId, o.Name, o.IsWon, o.Id, o.Amount From Opportunity o WHERE o.IsWon = true';
insert pushTopic;
System.debug('Created new PushTopic: '+ pushTopic.Id);
May 3rd, 2012
jitendra Hello everyone,
On 24th April 2012, There was Apex code chat conducted by the Salesforce. So i thought to share important question and answers of that chat. You can read complete chat here.
Here are some of the (edited) highlights from this episode’s chat transcript.
Question: Is there a way in Apex to send an email and replace the default from email address (no-reply@salesforce.com)?
Ans: Yes, using either the setSenderDisplayName or setOrgWideEmailAddressID methods on the SingleEmailMessage or MassEmailMessage classes.
Question: Which fields are accessible in a Trigger.new record without performing a SOQL query? For example if my trigger is on the Contact object, are fields on the parent Account object (like Account Description) accessible without performing an explicit SOQL query?
Ans: You can use Trigger.new to access all non-null fields of the object on which the trigger is defined. You have to perform an explicit SOQL query to access any fields on associated parent or child records. For example, if the trigger is defined on Contact, you can only access the Id of the parent Account record (via AccountId) in Trigger.new. You’d need to perform a separate SOQL query to access any other field on the parent Acccount record (e.g. Description, Industry etc.).
April 23rd, 2012
jitendra 61. How to round the double to two decimal places in Apex?
Ans:
Decimal d = 100/3; Double ans = d.setScale(2) ;
62.In Profile settings, what is difference between “Modify All Data” and “Modify All” ?
Ans:
Modify All Data : Create, edit, and delete all organization data, regardless of sharing settings.
Modify All : Give All (Read, Create, Add, Delete) permission to selected Object.
April 18th, 2012
jitendra I have searched a lot for any library available for the Gantt Chart however there are very few available on the web. Even i was not able to find out the chart in “Google API”.
In this article, i will delineate creating the “Gantt Chart” using JQuery and JSON. In previous article we have seen that how to generate JSON using Salesforce. So continuing the last article, i will use the same JSON reponse to create the “Gantt Chart”.
What is Gantt Chart?
A Gantt chart is a type of bar chart, developed by Henry Gantt, that illustrates a project schedule. Gantt charts illustrate the start and finish dates of the terminal elements and summary elements of a project.
In this example i am going to create the Gantt Chart for room reservation system. for this i am going to use the JQuery plugin for creating Gantt Chart found here.
Plugin uses following JSON format :
[{ "name" : "Task#1"
, "desc" : " Task Desc"
, "values": [
{ "from" : "/Date(1296547200000)/"
, "to" : "/Date(1296554400000)/"
, "desc" : "<b>Task #1<br>"
, "customClass": "ganttRed" (optional)
, "label" : "Task #1" (optional)
},
{ "from" : "/Date(1296637200000)/"
, "to" : "/Date(1296649800000)/"
, "desc": "<b>Task #</b>"
, "customClass": "ganttOrange" (optional)
, "label": "Task #1" (optional)
}
]
},
...
]
However we know that the variable name “from” and “desc” are not valid in Apex because they are keyword. so as a workaround i am replacing the placeholders after the generation of JSON in previous article.
April 18th, 2012
jitendra In this article, i will demonstrate using the JSON.serialize() method provided by the Salesforce to convert the class into equivalent JSON String.
Before going into depth would like to explain the basic concept of JSON syntax for the newbie.
There are following thumb rules i have identified from my experience, please comment in this article if i miss something here:
Example of JSON syntax:
{
"firstName": "Jitendra",
"lastName" : "Zaa",
"age" : 26,
"address" :
{
"streetAddress": "21 2nd Street",
"city" : "Nagpur",
"state" : "MH",
"postalCode" : "400008"
},
"phoneNumber":
[
{
"type" : "Mobile",
"number": "212 555-1234"
},
{
"type" : "Home",
"number": "646 555-4567"
}
]
}
March 28th, 2012
jitendra Lots of time i have seen the question on salesforce developer forum regarding the trigger on Attachment. As this is not a straightway, still we can have trigger on Attachment.
We cannot create trigger on Attachment from the standard salesforce UI however we will have to use the eclipse.
While creating the trigger, we have to keep some important points. We should be very careful while writing the trigger on Attachment, as it will be used by any standard or custom Object and therefore the criteria to run trigger for “particular object only” must be handled carefully.
March 27th, 2012
jitendra Although this is very common approach and lots of articles are around on this topic, still I want to delineate the topic in other way. This topic covers complete scenarios for the approval process based on the Apex class.
Agenda of this article:
Assumptions:
Important URLS:
API of Approval Process classes:
Steps of Standard approval process defined:
March 10th, 2012
jitendra 51. Explain Permission sets released in Winter 12.
Ans :
A permission set is a collection of settings and permissions that give users access to various tools and functions. The settings and permissions in permission sets are also found in profiles, but permission sets extend users’ functional access without changing their profiles. For example, to give users access to a custom object, create a permission set, enable the required permissions for the object, and assign the permission set to the users. You never have to change profiles, or create a profile for a single use case. While users can have only one profile, they can have multiple permission sets.
March 5th, 2012
jitendra Cascading Style Sheet (CSS) is the language used by all the web languages like ASP.Net, PHP, JSP or Velocity (Basically HTML) to control the display style of the elements without changing the code. With the help of CSS we can control the border width, color, background color, background image, font and so on.
With the help of CSS 3 other than just style now we can even animate, translate and do lots of stuff which were not possible by the CSS 2 and needed the help of other JavaScript library like JQuery UI.
In this tutorial we are going to learn different transform operations supported by the CSS 3.
The Transform operations are supported by IE 9, Mozilla, Google Chrome, Safari and Opera.