Tag Archives: SFDC

What is cloud computing?

Cloud Computing is the use of hardware and software to deliver a service over a network (typically the Internet). With cloud computing, users can access files and use applications from any device that can access the Internet.

There are 3 services that are fundamentally used in cloud computing:

  • Infrastructure as a service (IAAS)
  • Platform as a service (PAAS)
  • Software as a service (SAAS)

If you have a web based mail account hosted by Gmail, Yahoo, Hotmail, Rediffmail etc, then you have already experienced cloud computing. Instead of storing the mails on your computer It store them some where else, you use a browser to connect to the Internet and access the mails. The software and storage for your account doesn’t exist in your computer. This is one of the cloud computing service. You as an user simply access the services in cloud with your computer browser. But, in the back end there are various computers, servers and data storing systems that create the whole cloud computing system.
Infrastructure as a service (IAAS) :
In Infrastructure as a service (IAAS) the provider manages and delivers the underlying infrastructure, including storage, network and computing resources which can be used by software developers for building business solutions. Cloud users can install their operating system and their applications on the cloud infrastructure. Example of the companies that provide IAAS are Amazon EC2, Google compute engine, HP cloud etc.
Platform as a service (PAAS):
Platform as a service (PaaS) is a category of cloud computing services that provides a computing platform on top of which you can build a application as desired. The platform can include operating system, programming language, frameworks, libraries, services database and and other services that are required to host your developed application. Service provider could offer a developer tool which can be used to build services or database services or data storage services on the provided platform. Example of PAAS service providers are Force.com, Heroku, Azure cloud services, Google app engine.
Software as a service (SAAS):
Software as a service (SAAS) is a way of delivering applications over the Internet—as a service. Instead of installing and maintaining software, you simply access it via the Internet, freeing yourself from complex software and hardware management. An example of application service is CRM or ERP. SAAS delivers single application through the browser to number of customers using a multitenant architecture environment. Salesforce.com is a Best known example of SAAS, that provides CRM application built on force.com. Other examples of SAAS are google apps, microsoft office 365.

Salesforce Enterprise WSDL Error in .Net – Unable to generate a temporary class (result=1)

“Unable to generate a temporary class (result=1)” is returned when .Net integration tries to parse the Enterprise WSDL version 32.0
In Winter ’15 (API version 32.0), a number of additional sObjects are available including ListViewRecord, whose definition is as follows:

<complextype name="ListViewRecord">
    <sequence>
        <element maxoccurs="unbounded" name="columns" type="tns:ListViewRecordColumn"></element>
    </sequence>
</complextype>

Here is the solution:

Change above xml to below format:

<complextype name="ListViewRecord">
    <sequence>
        <element maxoccurs="unbounded" name="columns" type="tns:ListViewRecordColumn"></element>
    </sequence>
<xsd:attribute name="tmp" type="xsd:string"></xsd:attribute>
</complextype>

As a result .Net integration fail due to a bug in .NET’s XmlSerializer as described in the following links: https://connect.microsoft.com/VisualStudio/feedback/details/471297

download

Convert 15 digit Id to 18 digit Id in Salesforce apex class

In Salesforce each record Id represents a unique record within an Organisation.
These ids are in two formats for every record Id in Salesforce:

  • 15 digit case-sensitive version which is referenced in the UI (Detail pages / reports)
  • 18 digit case-insensitive version which is referenced through the API

Apex Class:

public class TestPage
{
    public String FifteenDigit {get;set;}
    public Id EighteenDigit {get;set;}
     
    public TestPage(){
        FifteenDigit = 'a0390000009ooJG';
        EighteenDigit = FifteenDigit;
    }
}

Visualforce Page:

<apex:page controller="TestPage" doctype="html-5.0">
   <apex:form>
       <apex:outputtext value="Fifteen Digit : "></apex:outputtext>
       <apex:outputtext value="{!FifteenDigit}"></apex:outputtext>
       <apex:outputtext value="Eighteen Digit : "></apex:outputtext>
       <apex:outputtext value="{!EighteenDigit}"></apex:outputtext>
   </apex:form>
</apex:page>

download

Note: CASESAFEID(Id) function in a formula field can be used to capture the 18 digit id of a record.

Difference between multiple messaging components in Visualforce Page?

Difference between multiple messaging components in Visualforce Page

  • It is used for display a message for a specific component, such as a warning or error.
    <apex:message></apex:message>
    
  • It is used for display all messages for all components on the current page, such as a warning or error.
    <apex:messages></apex:messages>
    
  • It is used for displaying custom messages in the visualforce page using the Salesforce pattern for errors, warnings and other types of messages for a given severity.
    <apex:pagemessage></apex:pagemessage>
    
  • It is used for displays all the messages that were generated for all components on the current visualforce page, presented using the Salesforce styling.
    <apex:pagemessages></apex:pagemessages>
    

Apex Message in Visualforce Pages

Apex Messages in Salesforce are used for displaying messages such as a warning or an error in visualforce page. In this article I’ll demonstrate how to use different types of messaging options in VisualForce page.
Apex message severities are:

  • CONFIRM
  • ERROR
  • FATAL
  • INFO
  • WARNING

CONFIRM:

Visualforce Page:

<apex:page controller="SuccessMessage"> 
<apex:pagemessages> 
</apex:pagemessages> 
</apex:page> 

Apex Class:

public class SuccessMessage
{ 
   public SuccessMessage()
   {
      ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.Confirm, 'This is a success message'));
   }
} 

Confirm

 

ERROR:

Visulaforce Page:

<apex:page controller="ErrorMessages"> 
<apex:pagemessages> 
</apex:pagemessages> 
</apex:page> 

Apex Class:

public class ErrorMessages
{ 
   public ErrorMessages()
   {
     ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.Error, 'This is an error message'));
   }
}

Error

 

WARNING:

Visualforce Page:

<apex:page controller="WarningMessage"> 
<apex:pagemessages> 
</apex:pagemessages> 
</apex:page>

Apex Class:

public class WarningMessage
{ 
   public WarningMessage()
   {
      ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.Warning, 'This is a warning message'));
   }
} 

Warning

 

INFO:

Visualforce Page:

<apex:page controller="InfoMessage"> 
<apex:pagemessages> 
</apex:pagemessages> 
</apex:page>

Apex Class:

public class InfoMessage
{ 
   public InfoMessage()
   {
      ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.Info, 'This is an informational message'));
   }
}

Info