Thursday, 10 November 2011

WSDL Structure

Salesforce Webservice API is implemented to comply with the following standards

Simple Object Access Protocol (SOAP) 1.1
Web Service Description Language (WSDL) 1.1
WS-I Basic Profile 1.1

WSDL 1.1 (Web Service Definition Language) Documents

WSDL doc describes the web service definition language and it has the following major components.

<type> -> data type
<message>  -> messages
<portype>  -> the operation performed by the web service
<binding> -> communication protocols used by the web service.

Sample wsdl document:
<definition>
<message name="getInputRequest">
  <part name="term" type="xs:integer"/>
  <part name="term" type="xs:integer"/>
</message>

<message name="getResultResponse">
  <part name="value" type="xs:integer"/>
</message>

<portType name="calculate">
  <operation name="add">
    <input message="getInputRequest"/>
    <output message="getResultResponse"/>
  </operation>
</portType>

<binding type="calculate" name="b1">
   <soap:binding style="document"
   transport="http://schemas.xmlsoap.org/soap/http" />
   <operation>
     <soap:operation soapAction="http://example.com/calculate"/>
     <input><soap:body use="literal"/></input>
     <output><soap:body use="literal"/></output>
  </operation>
</binding>
</definition>

where

  • types, which provides data type definitions used to describe the messages exchanged.
  • message, which represents an abstract definition of the data being transmitted. A message consists of logical parts, each of which is associated with a definition within some type system.
  • portType, which is a set of abstract operations. Each operation refers to an input message and output messages.
  • binding, which specifies concrete protocol and data format specifications for the operations and messages defined by a particular portType
Wsdl 1.1 vs 2.0

Tuesday, 8 November 2011

Salesforce Certification - Mock Exam

Salesforce Certification  - Mock Exam - Sample Question & Answers

Salesforce Training

* Salesforce Training videos are available here: DEV401, DEV501, Admin course videos are available here.
http://salesforcechannel.com/pages/developer-training

* Dreamforce & other webinars are available:
http://salesforcechannel.com/

* Salesforce training videos are also available in iTunes
http://itunes.apple.com/gb/podcast/salesforce.com-training-certification/id325668840#

* How to deploy the salesforce database:
http://www.youtube.com/watch?v=4K1RnpSMieQ

Use http://www.database.com to create your free (30 day trail) development sandbox & practice yourself the deployment operation.

* Understanding Security concepts (Profiles, Roles, OWD, Sharing Roles, Groups, Manual Sharing).
http://www.youtube.com/watch?v=uc13wsQJzz0

Record Id

There are two versions of every record Id in salesforce :


15 digit case-sensitive version which is referenced in the UI
18 digit case-insensitive version which is referenced through the API



  • Each of the 15 characters can be a numeric digit (0-9), a lowercase letter (a-z), or an uppercase letter (A-Z).   Two unique IDs may only be different by a change in case.
  • Because there are applications like Access which do not recognize that 50130000000014c is a different ID from 50130000000014C, an 18-digit, case-safe version of the ID is returned by all API calls. 
  • The 18 character IDs have been formed by adding a suffix to each ID in the Force.com API. 18-character IDs can be safely compared for uniqueness by case-insensitive applications, and can be used in all API calls when creating, editing, or deleting data.   Salesforce.com recommends that you use the 18-character ID.
  • The last 3 digits of the 18 digit ID are all capital letters and each of those 3 is a checksum for the other digits in the 15 digit ID. The 16th digit is a checksum of the first 5 characters, the 17th checks the second 5, and the 18th checks the last 5.


Saturday, 5 November 2011

MVC Design Architecture

undefined


Controller:  Whenever the client/user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data (db), the controller is responsible for directing the appropriate view to the user. In  GUIs, the views and the controllers often work very closely together.


Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.  


View : The view represents the presentation of the application. The view object refers to the model/data. It uses the query methods of the model/data to obtain the contents and renders it.


In Salesforce:
Model refers Objects/fields
View refers VF Pages/CSS
Controller refers VF Controller/Apex Code


Trigger Context Variable: Trigger.new vs Trigger.old

Trigger.new stores new values of a record. This basically means that when you edit a record and save it, your trigger would be called and the values that you have changed will be available in Trigger.new.

  • Returns a list of the new versions of the sObject records.
  • Note that this sObject list is only available in insert and update triggers, and the records can only be modified in before triggers.

Trigger.old stores the old values of a record. This basically means that when you edit a record and save it, your trigger would be called and the values that were available before you edited the record would be stored in Trigger.old.

  • Returns a list of the old versions of the sObject records.
  • Note that this sObject list is only available in update and delete triggers.
Context Variable Considerations
  • trigger.new and trigger.old cannot be used in Apex DML operations.
  • You can use an object to change its own field values using trigger.new, but only in before triggers. In all after triggers, trigger.new is not saved, so a runtime exception is thrown.
  • trigger.old is always read-only.
  • You cannot delete trigger.new.


Salesforce.com Competitors

How 3 Salesforce.com Competitors Are Trying to Poach Customers at Dreamforce

  • Microsoft Dynamics
  • Oracle CRM On Demand
    • With CRM On Demand you can do all this and a lot more, leveraging a market-leading, flexible hosted CRM solution offered at a predictable per user, per month price.

      With comprehensive features that include:
      • Sales: tools for driving pipeline and forecasting effectiveness
      • Service: tools for resolving issues efficiently across all customer touch points
      • Marketing: tools for managing, executing and analysing effective campaigns
      • Call Centre: tools for delivering a hosted multichannel support application in days
      • CRM Analytics: tools for combining real-time intelligence with deep historical knowledge
      • Mobile: tools for 'anytime, anywhere' access to key customer information
  • Sugar CRM
    • Sugar is affordable and easy to use business CRM, designed to help your business communicate with prospects, share sales information, close deals and keep customers happy. Thousands of successful companies use Sugar everyday to manage sales, marketing and support.
    • As an open-source, web-based CRM solution, Sugar is easy to customize and adapt to your changing needs. Ideal for small and medium-sized companies, large enterprises and government organizations, Sugar can run in the Cloud or on-site.

Friday, 4 November 2011

LookUp vs Master - Detail relationship in SFDC

Master – Detail Relationship :
  1. We cannot create master – detail relationship type fields directly if records already exists.
  2. If we delete master records then detail (Child) records are deleted.
  3. The Owner field on the detail and subdetail records is not available and is automatically set to the owner of the master record. Custom objects on the “detail” side of a master-detail relationship can't have sharing rules, manual sharing, or queues, as these require the Owner field.
  4. You can define master-detail relationships between custom objects or between a custom object and a standard object. However, the standard object cannot be on the detail side of a relationship with a custom object. In addition, you cannot create a master-detail relationship in which the User or Lead objects are the master.
  5. The master-detail relationship field is required on the page layout of the detail record.
  6. Rollup Summary fields are only available on master-detail relationships, not lookups.
  7. One detail side record can have maximum 2 masters but no limit on the Lookup fields.
Look up relationship :
  1. Look up relationship creates relations between two objects.
  2. If we delete any object then other object is not deleted.

Thursday, 3 November 2011

How to create Web-To-Lead ?

1. To create a Web-to-Lead form, click Click Your Name | Setup | Customize | Leads | Web-to-Lead.

2. Select fields to include on your Web-to-Lead form.

3. Specify the complete URL to which users should be directed after they submit their information—for example, your company's home page for a thank you page—and click Generate.

4. Copy the generated HTML code and provide it to your company's webmaster to incorporate into your website.
    (or)  save the copied html code into your local drive eg. c:\salesforce\WebToLeadExample.html

5. Click Finished.

6. Double click the WebToLeadExample.html file saved in step 4 and enter the details and click "Submit"

7. Click the Leads tab in your Salesforce application and check the newly created web to lead details.