Tag Archives: Salesforce

What is Salesforce?

download

Today the world is leaded by Cloud computing. Salesforce.com is one of the way for moving all your applications to cloud. There are lots of question running in your mind that what is Salesforce? What are its features? What are the benefits of moving apps to Salesforce? So to answer your questions, here is a small article which would help you find your answers. I have tried here to answer all these questions in a simple manner.

Salesforce is a SaaS (software-as-a-service), global enterprise software company Best known for its Customer Relationship Management (CRM), that is now also offering platform-as-a-service. Salesforce is a pioneer  in providing a high quality on-demand CRM software (referred to as “The Sales cloud” by Salesforce). They have diversified into customer service and support on-demand offerings as well (referred to as “The service cloud” by Salesforce).

Salesforce is a classic manifestation of two (SaaS and PaaS) out of the three major components of cloud computing.

Following is a list of products and services offered by Salesforce :

  • Customer Relationship Management (CRM) –  Their CRM is best in class in the on-demand category. With highly robust features and ease to customize, its one of the most adaptable CRM software in the market.
  • Force.com Platform – This is the platform-as-a-service offering of Salesforce.
  • Chatter – Think of chatter as a Facebook for enterprise! It facilitates real time collaboration at workplace bringing people, data, and content together in a secure, and trusted network.
  • AppExchange – AppExchange is a directory of applications built for Salesforce by third-party developers, which users can purchase and add to their Salesforce environment.
  • Customization – This is the core essence of Salesforce’s CRM application. User defined fields can be added and existing fields modified to better align the application with the in-use terminology within the company.
  • Web services – Salesforce offers a SOAP Web service API (An XML based method of sending and receiving information between applications via HTTP protocol) that enables integration with other systems.
  • Mobile support – One of the coolest features of Salesforce is the support for mobile devices, where some important functionality of its CRM can be accessed through mobile devices (currently the supported devices include iphone, Blackberry, Android and Windows based smartphones).
  • Programming Languages – Apex is a programming language that is syntactically similar to Java and is used in customization and implementation of applications.

 

Different Ways of Making a Field Mandatory in Salesforce

There are 4 ways of making the field mandatory:

Page Layout: Field can be made mandatory from the page layout when it needs to be made mandatory for a set of users.
Field Level Security: Field can be made mandatory from the FLS when it needs to be made mandatory for all the users in the Organization and even from the API’s.
Validation Rule: Field can be made mandatory from the Validation Rule, when it needs to be made mandatory for user who is using the same Page layout used by other users.
Before Triggers: we can also make a field mandatory using before trigger

Note: Salesforce.com recommends using the Page Layout option for making the field mandatory.

Get All Objects in Salesforce Org

We can use Schema.getGlobalDescribe() to get all properties of sObject.
Apex Class:

public class SampleController {
    
    Public string selectedObj{get;set;}
    
    Public List<Selectoption> getObjList(){
        List<Schema.SObjectType> objList = Schema.getGlobalDescribe().Values();     
        List<SelectOption> objNames = new List<SelectOption>();
        objNames.add(new SelectOption('','-- Select --'));
        for(Schema.SObjectType obj : objList)
        {
            objNames.add(new SelectOption(obj.getDescribe().getName(),obj.getDescribe().getLabel()));
        }
        objNames.sort();
        return objNames;
    }
}

Visualforce Page:

<apex:page controller="SampleController">
    <apex:form >
        <apex:pageBlock>
            <apex:outputlabel value="Object Name" for="plObj"/>      
            <apex:selectList value="{!selectedObj}" multiselect="false" id="plObj" size="1">
                <apex:selectOptions value="{!ObjList}"/>
            </apex:selectList>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Output: