Sunday 19 May 2013

  1. Difference Between SOQL and SOSL?

SOQL                                                                            SOSL
soql stands for salesforce query                   sosl stands for salesforce search language                                                            language  
  
Need to write different soql against diff        works on multiple objects at same
objects                                                                time

Soql against same field will be slow               All fields are alredy text indexed

can be used in apex classes and trigers.        cannot be used in triggers,can be
                                                                     used in apex classes anonumus block.                                                                                                            
2. Difference between Workflow and Approval Process?                                               
Workflow
Approval process
They are activated when a record is saved. approval process are triggered by explicitly clicking the "Submit for Approval" button.
Workflow consists of single step and single action Approval process consists of multiple steps. Also different action is taken based upon whether the record is approved or rejected.
Workflows can be modified or delete
  • In approvals some attributes cannot be modified. Processes must be deactivated before approvals can be del
    • 3.How many ways we can create VF pages?

    We can create VF pages in 3 ways:
  • 3ways 
    setup->App Setup->Develop->Pages and create new Visulaforce page.

    Setup -> My Personal Information -> Personal Information -> Edit check the checkbox development mode. When you run the page like this, https://ap1.salesforce.com/apex/MyTestPage. you will find the Page editor at the bottom of the page. You can write you page as well as the controller class associated with it, there it self.
    Using EclipseIDE you can create the Visulaforce page and write the code



    4.How many ways we can make a field required?
  • Field level
    Through the Page layouts
    Validation rules
    Triggers. 
    5.Explain about Schedule Apex? 
  • We use Apex Scheduler to schedule a controller to execute it at a given time in future. For this make an Apex Scheduler Controller and to schedule this controller go to... 
    Administration Setup->Monitoring->Scheduled Jobs from there we select that Controller class and then provide some time and date to execute it in future.
    To invoke Apex classes to run at specific times, first implement the Schedulable interface for the class, then specify the schedule using either the Schedule Apex page in the Salesforce.com user interface, or the System.schedule method.
    6.How can we call controller extension?

  • A controller extension is any Apex class containing a constructor that takes a single argument of type ApexPages.StandardController or CustomControllerName, where CustomControllerName is the name of a custom controller you want to extend
    Using Extension we can call Controller extension
    <apex:page standardController="Account" extensions="myControllerExtension">

    7. What is sand box? Explain me about Types of sandboxes?
    Sandbox are a copy of your enviroments for development, testing, and training without compromising the data and applications in your production environment.
    Configuration-only sandbox
    Configuration-only sandboxes copy all your production organization’s reports, dashboards, price books, products, apps, and customizations, but exclude all your organization’s standard and custom object records, documents, and attachments.
    Developer sandbox
    Developer sandboxes are special configuration-only sandboxes intended for coding and testing by a single developer. They provide an environment in which changes under active development can be isolated until they are ready to be shared. Just like configuration-only sandboxes, developer sandboxes copy all application and configuration information to the sandbox.
    Full sandbox
    Full sandboxes copy your entire production organization and all its data, including standard and custom object records, documents, and attachments.
    8. For testing why we are using sandbox instead of developer edition?
    Sandbox
    The salesforce.com Sandbox environment is an exact copy of your salesforce.com instance. You can copy your live instance to a sandbox environment (but you have to perform manually from sandbox to developer edition) where you can test any changes, implementations, AppExchange apps or updates. It can also be your hands-on training environment without risking your live data.
    You can either copy your configuration and data into a sandbox environment or just the configuration. It acts exactly like your live instance, but be careful if you have workflow rules or automations because they will work in the sandbox as well.
    I know that this sounds wonderful and if you don’t have it, you are dying to know how to get it. The problem is the cost. If you are on Unlimited Edition, then cost is not a problem because it comes included. But for Enterprise, Professional or Group Editions, you have to pay… and the price is hefty; anywhere between 25k-50k per year. For a lot of companies, that is more than they are paying for their live salesforce.com instance. So how do you test salesforce.com without Sandbox?  It is always suggested to develop application in sandbox instance then go for LIVE.
    Developer Edition
    Developer Edition was an edition created for development of integrations and apps, specifically for the AppExchange. It is also a great tool for testing/training in salesforce.com. What makes this a great tool is the fact that it is free. Anyone can get a Developer Edition of salesforce.com. It is a standard Enterprise Edition with very limited storage space. You cannot copy your configuration or data onto the Developer Edition, but you can customize it to match your instance’s look and feel. Once it is customized, you can use it for training, testing or anything else you want. It takes a little bit of work, but you can make it act and feel just like your live instance. The work is well worth it for the free price.
    To get a copy of Developer Edition for yourself or your company go here. Play around with it. Get apps from the AppExchange. Do anything and everything that you have been scared to do your live system. If you come up with a clever way of using the system, post it on AppExchange and share your knowledge.
    9.If delete an account object records what will happen?


    If You delete Account records all related records are also delete from Case ,Opty, and contact also deleted.

    10. write the code for to display an error message?
    ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'Please enter value'));

       

     


                                             


     
     

    No comments:

    Post a Comment