• Mahesh M
  • NEWBIE
  • 20 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 4
    Replies
*While uploading the morethan 4k records then getting  Regix too complicated exception  in “final String[] csvLines = csvContents.split('\n');”  line  due to big string is not working here.

Can anyone help me?
Hi,
I have Deleted my Salesforce Authentication in Mobile then it's effected to My salesforce org, My Salesforce org is Not Opening.
User-added image
Thanks
HI,
User-added image
If i click on custom calendar any date the value should be save on custom object date field.(using java script or jquery)


Thank, 
Hi
Can you help me  how to write custom  Form validation using  "setCustomValidity" (Jquery or Javascript).
for Examle if the field value(Name) is empty when click submit button it should be  disply on Name field  " please enter the Name " ..

Thanks,
Hi,

How to write  the fallowing code in Visualforcepage (Custom form Validation)?

<apex:page >
   <script>
   function InvalidMsg(textbox) {
       
       if (textbox.value == '') {
           textbox.setCustomValidity('Enter Email');
       }
       
       else if(textbox.validity.typeMismatch){
           textbox.setCustomValidity('please enter a valid email address');
       }
           else {
               textbox.setCustomValidity('');
           }
       
       return true;
   }
   function InvalidMsg1(textbox1) {
       
       if (textbox1.value == '') {
           textbox1.setCustomValidity('Enter Last Name');
       }
       
       
       else {
           textbox1.setCustomValidity('');
       }
       
       return true;
   }
   
   
   function InvalidMsgFirstName(textbox1) {
       
       if (textbox1.value == '') {
           textbox1.setCustomValidity('Enter First name');
       }
       
       
       else {
           textbox1.setCustomValidity('');
       }
       
       return true;
   }
   
   function InvalidMsgCompany(textbox1) {
       
       if (textbox1.value == '') {
           textbox1.setCustomValidity('Enter Company ');
       }
       
       
       else {
           textbox1.setCustomValidity('');
       }
       
       return true;
   }
   </script>
   <form id="myform">
       Email:     <input id="email" oninvalid="InvalidMsg(this);" name="email" oninput="InvalidMsg(this);"  type="email" required="required" /><br/><br/>
       FirstName: <input id="FirstName" oninvalid="InvalidMsgFirstName(this);" name="FirstName" oninput="InvalidMsgFirstName(this);"  type="text" required="required" /><br/><br/>
       Company:   <input id="Company" oninvalid="InvalidMsgCompany(this);" name="Company" oninput="InvalidMsgCompany(this);"  type="text" required="required" /><br/><br/>
       lastname:  <input id="lastname" oninvalid="InvalidMsg1(this);" name="lastname" oninput="InvalidMsg1(this);"  type="text" required="required" /><br/><br/>
       <input type="submit" />
   </form>

Thanks,
Hi,
Create vf page and include a custom visualforce chart in the vf page.It should display a Pie chart with different stages on lead object.

Explore on custom vf charts , type of charts in salesforce. ( Implement same report with different charts on Lead).
Thanks,
Mahesh
I need Test class for below trigger
trigger PartnerUpdate on Lead (after update) {   
    if (Trigger.new[0].IsConverted == true ){    
        Set<Id> leadIds = new Set<Id>();
        for (Lead lead : Trigger.new)
            leadIds.add(lead.Id);        
        Map<Id,Partner__c> Partner = new Map<Id, Partner__c>([select LeadName__c,Opportunity__c from Partner__c where leadName__c in :leadIds]);       
        if(!Trigger.new.isEmpty()) {
            for (Lead lead : Trigger.new)  {
                for (Partner__c c : Partner.values()) {
                    if (c.LeadName__c == lead.Id) {
                        c.Opportunity__c = lead.ConvertedOpportunityId;                       
                        update c;
                    }
                }
            }
        }
    }   
}

Thanks & Regadrs
Mahesh
Hi,
have to dispaly 4 fileds in single row in Opportunity i.e., Opp.Name, Stage, Amount,CloseDate in Opprtunity Edit Page. and Add the " ADD" ,"REMOVE" functionalites in the vf. if i click "ADD " button have to add the one Row( Opp.Name, Stage, Amount,CloseDate).

Thanks & Regards,
Mahesh
Hi,
 when i received a mail from any user the record should be created in lead object for this scenerio i used email services. after inserting the record in lead object the same person has to receive an email about record details (lastname,company,email,phone) . for this scenerio i am unable to use apex component 

Thanks.
 
Hi,
I have to increment with 100 in  one custom filed for very 5 minutes using batch class.
1) Create Text field "Skills" in department object and create a input text field skills in vf page.
a) based on input(skills) you entered on vf page and click on 'search' button,then fetch all the records from department object that matches skills you entered (input text without comma separated values).
b) based on input u entered with comma separated values in vf page input text box ad click on 'search' button , use like operator to search the records in department object and display the related matching records on vf page(input should be with comma separated values).
i have one custom field i.e., Intreste_Courses__c in am given 'JAVA,Oracle,Sap' for one Record 'JAVA,Oracle,Sap,.Net' for another record so how i can seacrh only one value Like 'Java'.
if i seach with value name 'java'  i want to display related java value record.
1) Create a VF page and write a controller, for vf page use <apex: variable> tag to create a counter(default value set to 1 for apex variable) for each iteration using apex repeat tag(to increment counter).

write a controller for this vf page and display account names  in the below format
(1)john
(2)james
(3)Joel
(4)vilsan
(5)zenith
(6)onesh
(7)balaji


Any help .
Thanks. 
*While uploading the morethan 4k records then getting  Regix too complicated exception  in “final String[] csvLines = csvContents.split('\n');”  line  due to big string is not working here.

Can anyone help me?
Hi Expert,

I Have One Requirement,

1. Want to update Sales_Order__c record's (going to update Sap_Number__c , SAP_createdDate__c). 

2.Click to Upload Excel File.

3. Click to Update Sales Order Button .

4.Need To Updae With Existing Records (With same Rcords).

5. I designed a  Visualforce pages as well, please give me a good idea to how can i achieve this Process with the Apex.


Regards,
Soundar.
Hi,

How to write  the fallowing code in Visualforcepage (Custom form Validation)?

<apex:page >
   <script>
   function InvalidMsg(textbox) {
       
       if (textbox.value == '') {
           textbox.setCustomValidity('Enter Email');
       }
       
       else if(textbox.validity.typeMismatch){
           textbox.setCustomValidity('please enter a valid email address');
       }
           else {
               textbox.setCustomValidity('');
           }
       
       return true;
   }
   function InvalidMsg1(textbox1) {
       
       if (textbox1.value == '') {
           textbox1.setCustomValidity('Enter Last Name');
       }
       
       
       else {
           textbox1.setCustomValidity('');
       }
       
       return true;
   }
   
   
   function InvalidMsgFirstName(textbox1) {
       
       if (textbox1.value == '') {
           textbox1.setCustomValidity('Enter First name');
       }
       
       
       else {
           textbox1.setCustomValidity('');
       }
       
       return true;
   }
   
   function InvalidMsgCompany(textbox1) {
       
       if (textbox1.value == '') {
           textbox1.setCustomValidity('Enter Company ');
       }
       
       
       else {
           textbox1.setCustomValidity('');
       }
       
       return true;
   }
   </script>
   <form id="myform">
       Email:     <input id="email" oninvalid="InvalidMsg(this);" name="email" oninput="InvalidMsg(this);"  type="email" required="required" /><br/><br/>
       FirstName: <input id="FirstName" oninvalid="InvalidMsgFirstName(this);" name="FirstName" oninput="InvalidMsgFirstName(this);"  type="text" required="required" /><br/><br/>
       Company:   <input id="Company" oninvalid="InvalidMsgCompany(this);" name="Company" oninput="InvalidMsgCompany(this);"  type="text" required="required" /><br/><br/>
       lastname:  <input id="lastname" oninvalid="InvalidMsg1(this);" name="lastname" oninput="InvalidMsg1(this);"  type="text" required="required" /><br/><br/>
       <input type="submit" />
   </form>

Thanks,
I need Test class for below trigger
trigger PartnerUpdate on Lead (after update) {   
    if (Trigger.new[0].IsConverted == true ){    
        Set<Id> leadIds = new Set<Id>();
        for (Lead lead : Trigger.new)
            leadIds.add(lead.Id);        
        Map<Id,Partner__c> Partner = new Map<Id, Partner__c>([select LeadName__c,Opportunity__c from Partner__c where leadName__c in :leadIds]);       
        if(!Trigger.new.isEmpty()) {
            for (Lead lead : Trigger.new)  {
                for (Partner__c c : Partner.values()) {
                    if (c.LeadName__c == lead.Id) {
                        c.Opportunity__c = lead.ConvertedOpportunityId;                       
                        update c;
                    }
                }
            }
        }
    }   
}

Thanks & Regadrs
Mahesh

I'm working on a visualforce page to streamline data entry for my organization.  I find I need to do some client-side javascript validations.  I'm capturing data that I then use to create 4 related objects at once.  The page has a controller extension, so the object related to that controller extension gets its normal validations.  Failure is uglier if required data on the other objects isn't provided, so I'd like to head that off by making sure certain fields are filled in.

 

I've tried a few different ways of doing this, but not met with much success.  I think my problem is figuring out how to get a page element's ID via $component.  It seems like there should be an easier way to get an element's ID, but that the method I've found referenced here.  Can you point me toward good working examples of client-side validation or reliable way to get the ID of an element in a page?

 

The examples I've found here have a very simple page structure.  I'd like to figure out the correct $component... reference to LastNameFld in the code below.  Any suggestions are welcome.  Do any of you use some tool like Firebug to help unravel the code?

 

<apex:page standardController="Contact" extensions="FastContactEntryPageController">   
    <apex:form >       
        <apex:pageBlock title="Fast Contact Entry" mode="edit" id="FCEMainBlock" >
            <apex:outputPanel id="panelMsg">
                <apex:pagemessages ></apex:pagemessages>  
            </apex:outputPanel>
            
            <apex:outputPanel id="InputSec">                      
            <apex:pageBlockSection title="Scholar Contact" id="sc1" columns="2">
            <apex:pageBlockSectionItem >
            <apex:commandButton value="Save" id="theSaveButton"  onclick="validation();"/><p/>

            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
            <apex:commandButton action="{!Cancel}" value="Cancel" id="theCancelButton"/><p/>
            </apex:pageBlockSectionItem>                          
            
            <apex:pageBlockSectionItem >
             Scholar First Name:<apex:inputField value="{!contact.FirstName}"/>
             </apex:pageBlockSectionItem>
                          
             <apex:pageBlockSectionItem id="lnsec">
             Scholar Last Name:<apex:inputField id="LastNameFld" value="{!contact.LastName}" />                          
             </apex:pageBlockSectionItem>