• Purushottam Dank 1
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 2
    Replies
Hello all , 
I want to insert bulk records in custom metadata type , but except using custom metadataloader because i dont want any related contains like apex class , triggers etc after uninstalling or deleting custom metadata loader .... Help me on this ...
Thanks in advanced ... 
send mail to user list of records
Hello , I have custom object name team on that object i have field date of joining and Manager feild with look up users , now my condition is i have to send list of records which were completed 90 days and 180 days to manager what should i do ? and how ?
 i have to send list of records who complted so and so days from date of joining via email , to selected manager... 
Need Coding Solution Or Best way to achive this ....with solution ..
Hi , i have created i a VF page to add contacts but but the new requiment is have to put checkbox and delete checked records ???? 
i dont know how to solve but i just know i have to write Wrapper class m posting what i have done VF page lighting and Controller class ....
plz tell what should i do and what corrections i have to do in my code .... if possible post correct the code .... 

thanks in advance ... 
my controller and class ...

VF page lighting:
<apex:page StandardController="Contact" recordSetVar="contacts" tabStyle="Contact" extensions="MultiAdd"  id="thePage" >
    <apex:pageBlock title="Manage " mode="edit">
<apex:form >
    <apex:slds /> 
<apex:pageblock id="pb" >
    <apex:pageBlockButtons >
        <apex:commandbutton value="Add" action="{!Add}" rerender="pb1"/>
        <apex:commandbutton value="Save" action="{!Save}"/>
        <apex:commandbutton value="Cancel" action="{!Cancel}"/>
        
        </apex:pageBlockButtons>
    <apex:pageblock id="pb1">
          <apex:repeat value="{!lstInner}" var="e1" id="therepeat">
                <apex:panelGrid columns="6">
                    <apex:panelGrid headerClass="Name">
                        
                    <apex:facet name="header">Del</apex:facet>
                        
                        <apex:commandButton value="X" action="{!Del}" rerender="pb1" immediate="true"> -->
                        <apex:param name="rowToBeDeleted" value="{!e1.recCount}" assignTo="{!selectedRowIndex}"></apex:param>
                   <!-- </apex:commandButton> 
                </apex:panelGrid>
                <apex:panelGrid >
                    <apex:facet name="header">FirstName</apex:facet>
                    <apex:inputfield value="{!e1.Cont.FirstName}"/>
                </apex:panelGrid>
                <apex:panelGrid >
                    <apex:facet name="header">LastName</apex:facet>
                    <apex:inputfield value="{!e1.Cont.LastName}"/>
                </apex:panelGrid>
                <apex:panelGrid >
                    <apex:facet name="header">Email</apex:facet>
                    <apex:inputfield value="{!e1.Cont.Email}"/>
                </apex:panelGrid>
                <apex:panelGrid >
                    <apex:facet name="header">Age</apex:facet>
                    <apex:inputfield value="{!e1.Cont.age__c}"/>
                </apex:panelGrid>
                <apex:panelGrid >
                    <apex:facet name="header">Mobile</apex:facet>
                    <apex:inputfield value="{!e1.Cont.MobilePhone}"/> 
                </apex:panelGrid>
            </apex:panelGrid>
              </apex:repeat>
            </apex:pageblock>
    </apex:pageblock>
        </apex:form>
    </apex:pageBlock>
</apex:page>

controller:
public class MultiAdd
{
    
    //will hold the account records to be saved
    public List<Contact> LstCont  = new List<Contact>();
    
    //list of the inner class
    public List<innerClass> LstInner 
    {  get;set; }
    
    //will indicate the row to be deleted
    public String selectedRowIndex
    {  get;set; }  
    
    //no. of rows added/records in the inner class list
    public Integer count = 1;
    //{  get;set;  }    
    
    
    ////save the records by adding the elements in the inner class list to lstAcct,return to the same page
    public PageReference Save()
    {
        system.debug('Save Called');
        PageReference pr = new PageReference('/apex/MultiAdd');
        
        for(Integer j = 0;j<lstInner.size();j++)
        {
            LstCont.add(LstInner[j].Cont);
        } 
        insert LstCont;
        pr.setRedirect(True);
        return pr;
    }
        
    //add one more row
    public void Add()
    {  
        system.debug('Add Called');
        count = count+1;
        addMore();      
    }
    
    /*Begin addMore*/
    public void addMore()
    {
        //call to the iner class constructor
        innerClass objInnerClass = new innerClass(count);
        
        //add the record to the inner class list
        LstInner.add(objInnerClass);
        system.debug('Add More Called');
       // system.debug('lstInner---->'+lstInner);            
    }/* end addMore*/
    
    /* begin delete */
    public void Del()
    {
        system.debug('Delete Called');
        system.debug('selected row index---->'+selectedRowIndex);
        lstInner.remove(Integer.valueOf(selectedRowIndex)-1);
        count = count - 1;
        
    }/*End del*/
    /* Wrapper class 
    public class sObjectWrapper
    {
        public boolean isSelected{get;set;}  
        public Contact myContact{get;set;}  
        public sObjectWrapper(Contact myContact,Boolean isSelected){  
        this. myContact = myContact;  
        this.isSelected = isSelected;  
    }  
 }  */
    
    
    
    /*Constructor*/
    public MultiAdd(ApexPages.StandardsetController ctlr)
    {
        system.debug(' Called MultiAdd Constructor');
        LstInner = new List<innerClass>();
       // addMore();
        selectedRowIndex = '0';
        
    }/*End Constructor*/
        


    /*Inner Class*/
    public class innerClass
    {       
        /*recCount acts as a index for a row. This will be helpful to identify the row to be deleted */
        public String recCount
        { get;set;}
        
        
        public Contact Cont 
        { get;set;}
        
        /*Inner Class Constructor*/
        public innerClass(Integer intCount)
        {
           // System.debug('');
            recCount = String.valueOf(intCount);        
            
            /*create a new Contact*/
            Cont = new Contact();
            
        }/*End Inner class Constructor*/    
    }/*End inner Class*/
}/*End Class*/



 
HI to all ,
help me to solve following programms 
palindrome number program
pattern programs
diamond pattern program 
Delete vowels
Floyd's triangle 
Pascal triangle
hello everyone, i just started journey with salesforce ,
i want to do following programms in apex , help me to solve....
Factorial program
program to find HCF and LCM
program to convert decimal to binary
program to find nCr and nPr
program to add n numbers
Swap numbers program
program to reverse a number
palindrome number program.
 
hello everyone, i want to check entered year is leap year or not , what is code for this in apex ?
send mail to user list of records
Hello , I have custom object name team on that object i have field date of joining and Manager feild with look up users , now my condition is i have to send list of records which were completed 90 days and 180 days to manager what should i do ? and how ?
 i have to send list of records who complted so and so days from date of joining via email , to selected manager... 
Need Coding Solution Or Best way to achive this ....with solution ..
hello everyone, i just started journey with salesforce ,
i want to do following programms in apex , help me to solve....
Factorial program
program to find HCF and LCM
program to convert decimal to binary
program to find nCr and nPr
program to add n numbers
Swap numbers program
program to reverse a number
palindrome number program.