• vajrala
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 11
    Replies

I am interesting  to learn , how work with sandbox .

I know it is available only Enterprise and Unlimited Editions.

But i don't know how to create enterprise editions and how to create sandbox.

Is it possible to create Enterprise editions free .

please give me solution

I feced problems after writing the apex class .How to run the apex class .

please give me explanation with an example

I am to Force.com ide Please give me solutions how to configure ide and run apex class

I got error:-  Error: Invalid Data. Review all error messages below to correct your data.
Attempt to de-reference a null object

while writing the following code.

trigger AutomateApprove on Opportunity(After insert, After update)
{

    for (Integer i = 0; i < Trigger.new.size(); i++)
    {
     try
     {
        //Insure that previous value not equal to current, else if there is any field update on approval process action
        //there will be recurrence of the trigger.

        if(Trigger.new[i].Next_Step__c == 'Submit' && Trigger.old[i].Next_Step__c != 'Submit')
        {
           submitForApproval(Trigger.new[i]);
        }
        else if(Trigger.new[i].Next_Step__c == 'Approve' && Trigger.old[i].Next_Step__c != 'Approve')
        {
             approveRecord(Trigger.new[i]);
        }
        else if(Trigger.new[i].Next_Step__c == 'Reject' && Trigger.old[i].Next_Step__c != 'Reject')
        {
             rejectRecord(Trigger.new[i]);
        }
     }catch(Exception e)
     {
         Trigger.new[i].addError(e.getMessage());
     }
    }
please give me solution

I am not undestanding where we use system.assert() and system.assertEquals() and how it is working

please give me explanation with an example

I am not understanding what is the use of newMap,oldMap and how it used.

please give me explanation with example

i need clarity about insert before and insert after.

what happens when we use before insert and after insert

please give me clarification with an example

I applied client side validations by using javascript Like

<script type="text/javascript">
        var rname=/^([A-Za-z]\s?)+(\w\s?)*$/;
        var rphone=/\d{10}/;
        var remail=/^([a-z]+\w*)+\@+([a-z]+\w*)+\.+([a-z]*)$/;
        var rcity=/^[A-Za-z]*$/;
        var rstate=/^[A-Za-z]*$/;
        var rcountry=/^[A-Za-z]*$/;
        ErrorText='';
        function myfunction(){
            var sfname=document.getElementById('{!$Component.myform.entry.Patient_entry_section:pafname}').value;
            var slname=document.getElementById('{!$Component.myform.entry.Patient_entry_section:palname}').value;
            var sphone=document.getElementById('{!$Component.myform.entry.Patient_entry_section:paphone}').value;
            var semail=document.getElementById('{!$Component.myform.entry.Patient_entry_section:paemail}').value;
            var saddress1=document.getElementById('{!$Component.myform.entry.Demographic_entry_section:address1}').value;
            var saddresstype=document.getElementById('{!$Component.myform.entry.Demographic_entry_section:addresstype}').value;
            var scity=document.getElementById('{!$Component.myform.entry.Demographic_entry_section:city}').value;
            var sstate=document.getElementById('{!$Component.myform.entry.Demographic_entry_section:state}').value;
            var scountry=document.getElementById('{!$Component.myform.entry.Demographic_entry_section:country}').value;
            if(sfname!=''){
                if(!rname.test(sfname))
                ErrorText+="\n        First name must be start with Alphabates and allows only single space";
            }else{
                ErrorText+="\n        First Name is Required Field it must be Non-Empty";
            }
            if(slname!=''){
                if(!rname.test(slname))
                ErrorText+="\n        Last name must be start with Alphabates and allows only single space";
            }else{
                ErrorText+="\n        Last Name is Required Field it must be Non-Empty";
            }  
            if(sphone!=''&&(!rphone.test(sphone)))
                ErrorText+="\n        Phone number must contain 10 numbers";
            if(semail!=''&&(!remail.test(semail)))
                ErrorText+="\n        Invalid Email formate";
            if(saddress1=='')
                ErrorText+="\n        Address1 is Required Field it must be Non-Empty";
            if(saddresstype=='')
                ErrorText+="\n        Address Type is Required Field it must be Non-Empty";
            if(scity!=''&&(!rcity.test(scity)))
                ErrorText+="\n        City allows only Alphabets";
            if(sstate!=''&&(!rstate.test(sstate)))
                ErrorText+="\n        State allows only Alphabets";
            if(scountry!=''&&(!rcountry.test(scountry)))
                ErrorText+="\n        Country allows only Alphabets";
            if (ErrorText!= "") {
                alert("Error :" + ErrorText);
                return false;
            }
            else{
                alert("success");
                return true;
            }
                
       }
    </script>

It show alert messages.I need disply the javascript validation messages below the input field.please giveme explanation with an example.