• mahender
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 2
    Replies

Hi,

if I create 5 Accounts that account information dumped into excel or csv file on that end of the day.

Please any one help me.

Thanks in advance

 

Hi

How many custom objects and tabs can we create in salesforce enterprise edition???

would you please send the detail edition link page or material.

not only enterprice would you please provide the information for all editions

Hi

How many custom objects and tabs can we create in salesforce enterprise edition???

would you please send the detail edition link page or material.

not only enterprice would you please provide the information for all editions

this pageHi,

I created one object Invoice with many fields now I want to divide the page with some header names in each divided page have some of the fields.

But how can I divide the page with header name and some of the fields next on wards also same but I don't want to use visualforce if compulsory please give some code...

for more details here i attached the page what i am looking

Thanks in advance

Hi,

i have one object that is Order. i want to clone the latest record from this object for this 

i need to select latest record and the record should ber clone..

So, would you tell "how to select the latest order and how to wite the code for Clone button  that should be clone  recently created order only "

          Here i want to  create the Clone button not for the particuler record in the view page in that page all record list page.i think you can understand.

 

 

would any one help

 

thanks in Advance.....

 

 



 

<apex:page controller="GenerateMilestone" id="UseCaseDisplay"  >
 <apex:form >
   <apex:pageBlock title="New Project" mode="edit" id="thePageBlock" >
      
      <apex:pageBlockSection columns="1">
         <apex:pageBlockSectionItem >
           <apex:outputLabel value="Project Name" />
           <apex:inputText value="{!Name}" />
         </apex:pageBlockSectionItem>
      </apex:pageBlockSection>
      <apex:pageBlockSection columns="1">
        <apex:pageblockSectionItem >
         <apex:outputLabel value="No Of Milestones:" for="project"/>
         <apex:selectList value="{!Milestone}" size="1" id="milestone">
        <apex:selectOptions value="{!milestones}"/>
         <apex:actionSupport event="onchange" rerender="milestone"/>
        </apex:selectList>
        
       </apex:pageblockSectionItem>
      </apex:pageBlockSection>

       <apex:pageBlockButtons >
         <apex:commandButton value="send request" action="{!save}"/>
       </apex:pageBlockButtons>
      </apex:pageBlock>
    </apex:form>
  </apex:page>



class:

public class GenerateMilestone {
String projectName;
Integer milestone;
 public void setName(String pn) { this.ProjectName = pn; }
     public String getName() { return this.projectName; }
     public void setMilestone(integer m) { this.milestone = 10; }
     public Integer getmilestone() { return this.milestone; }
     
     public List<SelectOption> getMilestones() {
      List<SelectOption> optionList = new List<SelectOption>();
       optionList.add(new SelectOption('','-empty-'));
      for (my24X7PayTmA__New_Project__c np : [select id,Name, my24X7PayTmA__No_Of_Milestones_del__c from   my24X7PayTmA__New_Project__c   ])
      {
      system.debug(np);
        optionList.add(new SelectOption(np.id,np.my24X7PayTmA__No_Of_Milestones_del__c));

      }
      return optionList;    
    }
     
     
     
  public PageReference save()
    {
   my24X7PayTmA__New_Project__c  np=new my24X7PayTmA__New_Project__c(Name=ProjectName);
    insert np;
    return page.NewProject;
    }
}

i created one custom object i.e New Project in that one field is No of milestones it is picklist field 

now i created a visual force page i am trying to get this field in visualforce page 

 

Project Name:

No Of Milestones:here display the pick lsit values of custom field  no of milestones in new project object .

and these values are stored in New Project custom Object

i am getting the below error. 

Visualforce Error


System.NullPointerException: Argument 2 cannot be null 

 

Class.my24X7PayTmA.GenerateMilestone.getMilestones: line 15, column 47 External entry point

 

would you please help me.....

my mail id mahender.maram@gmail.com

if you need any information u can contact me.

thanks in adavance... 

 


InboundRequestpage


<apex:page controller="DependentObjects" id="UseCaseDisplay" label="FeatureCategoryReport" >

  <apex:form >
  <apex:pageBlock title="Send Request" mode="edit" id="thePageBlock" >

      <apex:pageBlockSection columns="1">

        <apex:pageBlockSectionItem >
        <apex:outputLabel value="Request Name" />
        <apex:inputText value="{!taskName}" />
        </apex:pageBlockSectionItem>
        
        <apex:pageblockSectionItem >
        <apex:outputLabel value="Select Project:" for="project"/>
        <apex:selectList value="{!project}" size="1" id="project">
        <apex:selectOptions value="{!projects}"/>
        <apex:actionSupport event="onchange" rerender="milestone"/>
        </apex:selectList>
        </apex:pageblockSectionItem>
        
        <apex:pageBlockSectionItem >
        <apex:outputLabel value="Select MileStone" for="milestones"/>
        <apex:selectList value="{!milestone}" size="1" id="milestone">
         <apex:selectOptions value="{!milestones}"/>
        </apex:selectList>
        </apex:pageBlockSectionItem>
                    
        <apex:pageBlockSectionItem >
        <apex:outputLabel value="Task Description" />
        <apex:inputTextarea value="{!description}"/>
        </apex:pageBlockSectionItem>
        
        <apex:pageBlockSectionItem >
        <apex:outputLabel value="Due Date" />
        <apex:inputText value="{!dueDate}"/>
        </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
      
      <apex:pageBlockButtons >
      <apex:commandButton value="send request" action="{!save}"/>
     </apex:pageBlockButtons>
    </apex:pageBlock>
     </apex:form></apex:page>


DependentObjects apex class:


public class DependentObjects {
  String project;
    String milestone;
    String taskName;
    String description;
    String status='New';
    String dueDate;
    
    public String getProject() { return this.project; }

    public void setProject(String s) { this.Project = s; }

    public String getMilestone() { return this.Milestone; }

    public void setMileStone(String s) { this.MileStone = s; }
    
    public void setTaskName(String s) { this.taskName = s; }
    
    public String getTaskName() { return this.taskName; }

    public void setDescription(String s) { this.Description = s; }
    
    public String getDescription() { return this.Description; }
        
    public void setStatus(String s) { this.status = s; }
    
    public String getStatus() { return this.Status; }
            
    public void setDueDate(String s) { this.dueDate = s; }
    
    public String getDueDate() { return this.dueDate; }

    public List<SelectOption> getProjects() {

      List<SelectOption> optionList = new List<SelectOption>();
      optionList.add(new SelectOption('','-empty-'));
      for (my24X7PayTmA__Milestone1_Project__c pr : [select id,Name from my24X7PayTmA__Milestone1_Project__c     order by Name])
      {

        optionList.add(new SelectOption(pr.id,pr.Name));

      }
      return optionList;    
    }

    public List<SelectOption> getMilestones() {

      List<SelectOption> optionList = new List<SelectOption>();

      optionList.add(new SelectOption('', '- None -'));

          if(project!=null)
           {
            for (my24X7PayTmA__Milestone1_Milestone__c m : [select id,Name from my24X7PayTmA__Milestone1_Milestone__c where Project__c=:project])
            {

            optionList.add(new SelectOption(m.id,m.Name));

            }

           }

      return optionList;

    }
    public PageReference save()
    {
   my24X7PayTmA__MilestoneProjectRequest__c  pr=new my24X7PayTmA__MilestoneProjectRequest__c(Name=taskName,my24X7PayTmA__Detail__c=description,my24X7PayTmA__Project__c=project,my24X7PayTmA__Milestone__c=milestone,my24X7PayTmA__Status__c=status);
    insert pr;
    return page.InboundRequestpage;
    }
}



RecevingRequest page:


<apex:page controller="RequestList" sidebar="false" showHeader="false">
<font size="8">List of open requests</font>
<center>
<apex:form >
<apex:dataTable value="{!lst}" var="list" cellpadding="5" border="2" Bgcolor="orange">
<apex:column >
<apex:facet name="header">Related Project</apex:facet>
<apex:outputField value="{!list.name}" />
</apex:column>
<apex:column >
<apex:facet name="header">Related Project</apex:facet>
<apex:outputField value="{!list.Project__c}"/>
</apex:column>
<apex:column >
<apex:facet name="header">Related Milestone</apex:facet>
<apex:outputField value="{!list.Milestone__c}"/>
</apex:column>
<apex:column >
<apex:facet name="header">Description</apex:facet>
<apex:outputField value="{!list.Detail__c}"/>
</apex:column>
<apex:column >
<apex:selectList value="{!action}" size="1">
<apex:selectOption itemLabel="Accept" itemValue="{!list.id}" ></apex:selectOption>
<apex:selectOption itemLabel="Reject" itemValue="{!list.id}" ></apex:selectOption>

</apex:selectList>
<apex:commandButton value="Do Action" action="{!doit}" reRender="out"> 
<apex:param name="Name" value="{!list.name}" 
assignTo="{!Name}"/> 
</apex:commandButton> 
</apex:column>
</apex:dataTable>
</apex:form>
</center>
<apex:outputPanel id="outing">
the id value is:<apex:outputText value="{!action}" id="out"></apex:outputText>
</apex:outputPanel>
</apex:page>


RequestList Apex class:


public class RequestList{
List<my24X7PayTmA__MilestoneProjectRequest__c   > lst;
String id;
public String action;
public void setAction(String data){this.action=data;}
public String getAction(){return this.action;}
public String getId(){return id;}
public List<my24X7PayTmA__MilestoneProjectRequest__c    > getLst(){
lst=[select id,my24X7PayTmA__Project__c,my24X7PayTmA__Milestone__c,Name,my24X7PayTmA__Detail__c from my24X7PayTmA__MilestoneProjectRequest__c   where my24X7PayTmA__Status__c='New'];
return lst;
}

public  void doit(){
List<my24X7PayTmA__MilestoneProjectRequest__c> lst=[select my24X7PayTmA__Project__c,my24X7PayTmA__Milestone__c,Name,my24X7PayTmA__Detail__c,my24X7PayTmA__Status__c from my24X7PayTmA__MilestoneProjectRequest__c where ID=:id];
lst[0].my24X7PayTmA__Status__c='Accepted';
Milestone1_Task__c task=new Milestone1_Task__c(Name=lst[0].Name,my24X7PayTmA__Description__c=lst[0].my24X7PayTmA__Detail__c,my24X7PayTmA__Project_Milestone__c=lst[0].my24X7PayTmA__Milestone__c);
update lst;
insert task;
}
}

 hi 

i have written one visualforce page i.e inboundRequestPage any user can send request and for this page i developed apex class and

i wrote another page for adminstrator to accept those tasks in this page two options provided one is Accept and one Reject when admin select  Accept and when click DoAction button then automatically doIt() will ececte and the particuler task should assign to particuler milestone ..

 

 

where i am getting probem is when i click DoAction button it is calling doIt() methiod but i am geeting visualforce error i.e

 

Visualforce Error

System.ListException: List index out of bounds: 0 

Class.my24X7PayTmA.RequestList.doit: line 15, column 5 External entry point

 

but when i gave the task name that task converting as a task but when i wrote an id i am getting above mentioned error

 

would you please help me........

 

<apex:page controller="GenerateMilestone" id="UseCaseDisplay"  >
 <apex:form >
   <apex:pageBlock title="New Project" mode="edit" id="thePageBlock" >
      
      <apex:pageBlockSection columns="1">
         <apex:pageBlockSectionItem >
           <apex:outputLabel value="Project Name" />
           <apex:inputText value="{!Name}" />
         </apex:pageBlockSectionItem>
      </apex:pageBlockSection>
      <apex:pageBlockSection columns="1">
        <apex:pageblockSectionItem >
         <apex:outputLabel value="No Of Milestones:" for="project"/>
         <apex:selectList value="{!Milestone}" size="1" id="milestone">
        <apex:selectOptions value="{!milestones}"/>
         <apex:actionSupport event="onchange" rerender="milestone"/>
        </apex:selectList>
        
       </apex:pageblockSectionItem>
      </apex:pageBlockSection>

       <apex:pageBlockButtons >
         <apex:commandButton value="send request" action="{!save}"/>
       </apex:pageBlockButtons>
      </apex:pageBlock>
    </apex:form>
  </apex:page>



class:

public class GenerateMilestone {
String projectName;
Integer milestone;
 public void setName(String pn) { this.ProjectName = pn; }
     public String getName() { return this.projectName; }
     public void setMilestone(integer m) { this.milestone = 10; }
     public Integer getmilestone() { return this.milestone; }
     
     public List<SelectOption> getMilestones() {
      List<SelectOption> optionList = new List<SelectOption>();
       optionList.add(new SelectOption('','-empty-'));
      for (my24X7PayTmA__New_Project__c np : [select id,Name, my24X7PayTmA__No_Of_Milestones_del__c from   my24X7PayTmA__New_Project__c   ])
      {
      system.debug(np);
        optionList.add(new SelectOption(np.id,np.my24X7PayTmA__No_Of_Milestones_del__c));

      }
      return optionList;    
    }
     
     
     
  public PageReference save()
    {
   my24X7PayTmA__New_Project__c  np=new my24X7PayTmA__New_Project__c(Name=ProjectName);
    insert np;
    return page.NewProject;
    }
}

i created one custom object i.e New Project in that one field is No of milestones it is picklist field 

now i created a visual force page i am trying to get this field in visualforce page 

 

Project Name:

No Of Milestones:here display the pick lsit values of custom field  no of milestones in new project object .

and these values are stored in New Project custom Object

i am getting the below error. 

Visualforce Error


System.NullPointerException: Argument 2 cannot be null 

 

Class.my24X7PayTmA.GenerateMilestone.getMilestones: line 15, column 47 External entry point

 

would you please help me.....

my mail id mahender.maram@gmail.com

if you need any information u can contact me.

thanks in adavance... 

 


Hi,

if I create 5 Accounts that account information dumped into excel or csv file on that end of the day.

Please any one help me.

Thanks in advance

Hi,

i have one object that is Order. i want to clone the latest record from this object for this 

i need to select latest record and the record should ber clone..

So, would you tell "how to select the latest order and how to wite the code for Clone button  that should be clone  recently created order only "

          Here i want to  create the Clone button not for the particuler record in the view page in that page all record list page.i think you can understand.

 

 

would any one help

 

thanks in Advance.....