New Batch#100 (10th Nov 2021) - Salesforce Admin + Dev Training (WhatsApp: +91 - 8087988044) :https://t.co/p4F3oeQagK

Wednesday, 29 August 2012

Upcoming Posts

  • Annotations (Yes)
  • Static Resources
  • Visualforce Order of Execution (getRequest and postbackRequest)
  • External Id
  • Aprrovals

Friday, 24 August 2012

After deleting a record in master object what will happen for the records of junction object

If I delete a record in master object what will happen for the records of junction object?
Solution:
* Suppose A and B are master objects and C is the child object
Few important points :
  1. One Object can have only two Master-Detail relationships.
  2. If we delete record A (First Master detail relationship is always primary) – then child record c will be deleted.
  3. If we delete record B then in this case also child record C will be deleted.
  4. If we delete record c then only C will be deleted , master record will not be deleted.
  5. If child C has two Master record A and B, Where A is primary relation then Child record C will inherit the look and feel of Parent object A.

Moving data from sandbox to production

How can I move Data from SandBox to Production?                                                                  
Solution:                                                                                                                                           
* We can't move your data from sandbox to production.
* We can only move components,applications and profile settings using changesets.
* FYI (For Your Information): We can move data from production to sandbox.
* Use export and import option for moving data into production.

Note: Indirectly, We can use Data Loader to move data from Sandbox to a csv file, and the import the data from csv file into Production.

Difference between Sales Cloud and Service Cloud

Sales Cloud
* "Sales Cloud" refers to the "sales" module in salesforce.com.
* It includes Leads, Accounts, Contacts, Contracts, Opportunities, Products, Pricebooks, Quotes, and Campaigns (limits apply).
* It includes features such as Web-to-lead to support online lead capture, with auto-response rules.
* It is designed to be a start-to-end setup for the entire sales process; you use this to help generate revenue.

Service Cloud
*"Service Cloud" refers to the "service" (as in "customer service") module in salesforce.com.
* It includes Accounts, Contacts, Cases, and Solutions.
* It also encompasses features such as the Public Knowledge Base, Web-to-case, Call Center, and the Self-Service Portal, as well as customer service automation (e.g. escalation rules, assignment rules).
* It is designed to allow you to support past, current, and future clients' requests for assistance with a product, service, billing, etc; you use this to help make people happy.

* The differences between Sales Cloud and Service Cloud are the same across each "edition" ("professional", "enterprise" and "unlimited"), mainly outlined above.
* The differences, as you can gather from the prior paragraphs, is that each cloud is designed to support a specific set of features that you would use to sell services and products, and support those services and products (respectively).

The main differences you will find are the limits between each edition. Professional Edition provides basic functionality; you can create limited customized UI pages (Visualforce), and you can use standard automation (e.g. assignment, escalation, and auto-response rules). Enterprise Edition provides additional features, including custom automation (e.g. workflow rules, Apex Code), improved Visualforce functionality, integration (API) access, generally increased limits, and additional customization features (e.g. more fields per object). Unlimited Edition is an extension of Enterprise Edition, and includes more storage space, premier support, more objects, increased API limits, and so on.

I would look here: http://www.salesforce.com/crm/editions-pricing.jsp, as well as the "Full Comparison Chart" located at the bottom of this page (PDF format), for additional information between each edition. Make sure you check each "tab" on that page for details about features for each cloud/app. You might also be interested in speaking to a sales representative with these types of questions.

Review Points

* We can only use runAs {System.runas()} in a test method. It is not possible to use it in Apex Classes.
* Developer Console by default works in User Mode. 
* For before mode in case of update for an event (if the update is for the same object on which we are writing the trigger) no need to use 'UPDATE' DML Statement.
* Data Loader time zone and sandbox or production time zone should be same while working with date fields. 
 * If we convert the lead record then that lead record won't exists in lead object but when running the reports it will display the converted leads.







Please see the below Comments

Friday, 17 August 2012

apex:component

How to disply custom client-side error messages on VF pge

Custom Error Messages on VF page

How to dipaly client side error messages like above?
Solution:
 By using jquery you can diplay error messages as you mentioned in the above image
1. First download the jquery file here.
2. If it is not downloading copy the code and paste it in notepad and save it with jquery.js like that.
3. Then upload that file into static resources.
4. In your vf page use the following code
<apex:page standardcontroller="Account" showHeader="false" standardStylesheets="false">
    
    <apex:includeScript value="{!$Resource.jquery}"/>
    <apex:includeScript value="http://ajax.microsoft.com/ajax/jquery.validate/1.6/jquery.validate.min.js"/>
    
    <script type="text/javascript"> 
        $(document).ready(function() {
             
            $('[id$=commentForm]').validate();             
             
            $('[id$=name]').rules("add",{
                required: true,
                minlength: 5
            });     
            
            $('[id$=email]').rules("add",{
                required: true,
                email: true
            });      
            
            $('[id$=url]').rules("add",{
                url: true
            });
            
            $('[id$=comment]').rules("add",{
                required: true
            });
            
            $('[id$=pwd]').rules("add",{
                required: true,
                minlength: 5
            });
            
            $('[id$=cpwd]').rules("add",{
                required: true,
                minlength: 5,
                equalTo: '[id$=pwd]'
            });      
            
            /* Customised the messages */
            jQuery.validator.messages.required = "You better have entered a value.. or else!"; 
            jQuery.validator.messages.equalTo = "No silly, you're supposed to type the same set of characters AGAIN.";                                                
        });
        
    </script>   
    
    <!-- Ignore my template -->
    <apex:composition template="Template">
        <apex:define name="title">
            <a href="http://thesilverlining-developer-edition.na7.force.com/jqueryvalidatedemo/">jQuery Forms Validation Demo</a>
        </apex:define>
        
        <apex:define name="blurb">
            <p>
                Fiddle with the form entering combinations of correct and incorrect values to see the validation rules in action. Hitting the sumbit button will also trigger form checking.
            </p>
        </apex:define>


        <apex:define name="content">    
            <apex:outputPanel layout="block" style="text-align:center; font-size:12px;padding: 4px">
                <apex:form id="commentForm" > 

                        <apex:outputlabel for="name">Name <span class="star">*</span></apex:outputlabel> 
                        <apex:inputtext id="name" value="{!account.name}"/>
                        <br/>
                        <apex:outputlabel for="email">E-Mail <span class="star">*</span></apex:outputlabel> 
                        <apex:inputtext id="email"  value="{!account.name}"/> 
                        <br/>
                        <apex:outputlabel for="url">URL (optional)</apex:outputlabel> 
                        <apex:inputtext id="url"  value="{!account.name}" /> 
                        <br/>
                        <apex:outputlabel for="comment">Your comment <span class="star">*</span></apex:outputlabel> 
                        <apex:inputtextarea id="comment" value="{!account.name}" style="width: 30%"/>
                        <br/>
                        <apex:outputLabel for="pwd">Password <span class="star">*</span></apex:outputLabel>
                        <apex:inputSecret id="pwd" value="{!account.name}"/>
                        <br/>
                        <apex:outputLabel for="cpwd">Confirm Password <span class="star">*</span></apex:outputLabel>
                        <apex:inputSecret id="cpwd" value="{!account.name}"/>                        
                        <br/>
                        <input type="submit" />
            
                </apex:form>
            
            </apex:outputPanel>
            
        </apex:define>
        
    </apex:composition>
     
</apex:page>
5. make changes according to your vfpage.
6. Then you will get the desired output
Refer Here:
 http://th3silverlining.com/2010/03/02/visualforce-form-validation-enhanced/#more-543

Labels