• Shailesh Patel
  • NEWBIE
  • 0 Points
  • Member since 2015
  • SFDC Developer/Administrator

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 7
    Replies
<html>
<body>
    <h1>Show POST method Data</h1>
    <form action="https://c50.visual.force.com/apex/TESTVFPAGE" method="POST" target="_top">
  <br/><input type="text" name="name" id="id" value="POST MESSAGE"/>
        <input type="submit" value="confirm"/>
    </form>
    <br/><br/>
</body>
</html>

How can we fetch this form data in apex class ,please guide us asap
Thanks in Advance
Hi,
we did create a one salesforce app and publish it on appexchange. we have ticked all the page as a salesforce 1 supported. But in appexchange we didnot see the app with salesforce1 Mobile  tag. Why this happens? what are the required steps to put that salesforce1 Mobile tag on our app in appexchange . Please help me

Thanks in Advance 
Hi guys,

i have a requirement where i want to set default date as today's date on order object start date field. How can i do that? Can u please help?
Hello, 

Im a newbie starting to use apex. Im trying to tweak a code to make dynamic rows and save them. I managed to get the visualforce page to load and save a new record number. The code i had was made for the standard account object. I made an custom object expenceclaims, the record is saved but te fields remaim empty. Could someone help me with this please!

Thanx in advance
<apex:page StandardController="Expence_Claims__c" extensions="ExpenceClaims" id="thePage" sidebar="false">
<apex:form >
<apex:pageblock id="pb" >
    <apex:pageBlockButtons >
        <apex:commandbutton value="Add" action="{!Add}" rerender="pb1"/>
        <apex:commandbutton value="Save" action="{!Save}"/>
    </apex:pageBlockButtons>
 
        <apex:pageblock id="pb2">
            
        <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">
                        <apex:param name="rowToBeDeleted" value="{!e1.recCount}" assignTo="{!selectedRowIndex}"></apex:param>
                    </apex:commandButton>
                </apex:panelGrid>   
                
                <apex:panelGrid title="SPD" >
                    <apex:facet name="header">Employee</apex:facet>
                    <apex:inputField value="{!Expence_Claims__c.Name_Employee__c}"/>
                </apex:panelGrid>
                
                <apex:panelGrid >
                    <apex:facet name="header">Date</apex:facet>
                    <apex:inputField value="{!Expence_Claims__c.Date__c}"/>
                </apex:panelGrid>
                
                <apex:panelGrid >
                    <apex:facet name="header">Description</apex:facet>
                    <apex:inputField value="{!Expence_Claims__c.Discription__c}" />
                </apex:panelGrid>
                
                <apex:panelGrid >
                    <apex:facet name="header">Amount</apex:facet>
                    <apex:inputField value="{!Expence_Claims__c.Amount__c}" />
                </apex:panelGrid>
                
                <apex:panelGrid >
                    <apex:facet name="header">Bank account</apex:facet>
                    <apex:inputField value="{!Expence_Claims__c.Bank_account_number__c}" />
                </apex:panelGrid>              
            </apex:panelgrid>
        </apex:repeat>
    </apex:pageBlock>
        
</apex:pageblock>
</apex:form>
</apex:page>
 
public class ExpenceClaims
{
    
    //will hold the Expence_Claims__c records to be saved
    public List<Expence_Claims__c>lstAcct  = new List<Expence_Claims__c>();
    
    //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()
    {
        PageReference pr = new PageReference('/apex/ExpenceClaims');
        
        for(Integer j = 0;j<lstInner.size();j++)
        {
            lstAcct.add(lstInner[j].acct);
        } 
        insert lstAcct;
        pr.setRedirect(True);
        return pr;
    }
        
    //add one more row
    public void Add()
    {   
        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('lstInner---->'+lstInner);            
    }/* end addMore*/
    
    /* begin delete */
    public void Del()
    {
        system.debug('selected row index---->'+selectedRowIndex);
        lstInner.remove(Integer.valueOf(selectedRowIndex)-1);
        count = count - 1;
        
    }/*End del*/
    
    
    
    /*Constructor*/
    public ExpenceClaims(ApexPages.StandardController ctlr)
    {
    
        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 Expence_Claims__c acct 
        {get;set;}
        
        /*Inner Class Constructor*/
        public innerClass(Integer intCount)
        {
            recCount = String.valueOf(intCount);        
            
            /*create a new Expence_Claims__c*/
            acct = new Expence_Claims__c();
            
        }/*End Inner class Constructor*/    
    }/*End inner Class*/
}/*End Class*/

 
<html>
<body>
    <h1>Show POST method Data</h1>
    <form action="https://c50.visual.force.com/apex/TESTVFPAGE" method="POST" target="_top">
  <br/><input type="text" name="name" id="id" value="POST MESSAGE"/>
        <input type="submit" value="confirm"/>
    </form>
    <br/><br/>
</body>
</html>

How can we fetch this form data in apex class ,please guide us asap
Thanks in Advance
<apex:page extensions="OnlinePurchaseController" showHeader="false" sidebar="false" standardController="Order__c">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:selectList value="{!selectedCategory}" label="Category" size="1">
                    <apex:actionSupport event="onchange" action="{!getProducts}" reRender="products"/>
                    <apex:selectOptions value="{!category}">
                    </apex:selectOptions>
                </apex:selectList>
             </apex:pageBlockSection>
            
            
             <apex:pageBlockSection >    
                <apex:pageBlockTable value="{!productList}" var="product" id="products">
                    <apex:column >
                        <apex:commandButton value="add" action="{!addToOrder}" reRender="orders,products">
                            <apex:param name="productID" value="{!product.ID}" assignTo="{!productID}"></apex:param>
                           </apex:commandButton>
                    </apex:column>
                    <apex:column value="{!product.Name}" />
                    <apex:column value="{!product.Price_Per_Item__c}" />
                </apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock >
        <apex:pageBlockSection id="orders">    
                <apex:pageBlockTable value="{!orderList}" var="order" >
                    <apex:column value="{!order.Name}"  headerValue="Name" />
                    <apex:column value="{!order.Price_Per_Item__c}" headerValue="Price Per Item" />
                       <apex:column headerValue="Quantity">
                        <apex:outputField value="{!order.Quantity__c}"  >
                            <apex:inlineEditSupport showOnEdit="update" event="ondblclick" /> 
                        </apex:outputField>
                    </apex:column> 
                    <apex:column headerValue="Total">
                        <apex:inputField value="{!order.Total__c}" />
                    </apex:column>
                </apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
i want to insert large number of records in Account Objects but as you know on salesforce governor limits is 10,000 records/DML so how can i divide list dynamic into sublist and is there any other way to insert list of records without exceed governor limits. i have been using batch class for it also. can you give me a sample code for my solution.
as per my knowledge there is a method for sublist in java but how can i do in apex?Please guide me.
Thanks in Advanced.