• Ankit Singhal
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 4
    Replies

guys,

 

I have a Pageblocktable in inlineedit mode on vf page.

now if i edit some values in each row.

I want to access the list of values with updated values in controller method.

I dont want to update values in database and just want to pass them further.

 

 

 

<apex:pageblock mode="inlineedit">

<apex:pageblocktable value="{!accounts"} var=d>

<apex:column value="{!d.name}"/>

</apex:pageblocktable >

</apex:pageblock>

 

 

How to achieve the value of list accounts with updated values in controller.

Hi Guys,

 

Can we use radiobutton to select just one record in apex:pageblocktable.

<apex:pageblocktable value="{!Contacts}" var="d" id="contacts">
<apex:column headervalue="Select contact">
<apex:actionsupport action="{!selectcon}" event="onclick" rerender=" ">
<input type="radio" />
<apex:param name="conid" value="{!d.Id}">
</apex:param></apex:actionsupport>
</apex:column>

 

My problem here is that I am able to select multiplre records.

i just want to select one record with help of radio button.

 

kindly suggest something.

i dont want to use a checkbox.

 

 

Guys,

 

I want to put a help text icon next to apex:sectioheader same as field level help.

i have explored the attributes description,help for apex:sectionheader.

 

but i want a icon same as field level help text .

and when user hovers there it should display some helptext

 

plz help

hi,

 

 

I have 3 tabs on my visualforce page.

and I am returning a list of records based on some criteria under tabs to display.

 

Now,I want to use same single query to populate 3 lists.

But to achieve this,I need to pass to controller  the tabname user has clicked,so that based o this arguement i can retreive the records from dynamic query

 

how to pass dynamically which tab user has clicked and then rendering that tab to display the list of records.

 

please help.

I have a custom object named Gecon__c.

 

Also,my client has enabled custom lookups on tasks .

So i have lookup to Gecon__c on task Object.

 

Every time a task is created for Account standard Object,task's WhatId is populated to AccountId and that custom lookup is populated as the Gecon__c record.

 

Now here is my problem:

 

Every time a task is created for that Account record,it is coming under Activities related list for that Gecon__c record and not under Open Activities related list for that Gecon__c record.

Similarly when a task is completed ,it is not reflecting under the Activity history related list on that Gecon__c record page but is reflecting under Activities related list only.

I think this is happening because there is a custom lookup created for Gecon__c object.

how to get rid of this Activities tab on Gecon__c record page.

plzz help ....

I want to display related list as when i hover on command link of parent record in Visualforce page .

 

Any suggestions please??

Hi Guys,

 

I have a scenario where I am collecting tasks in a list.

Now the size of this list can exceed 50000.

 

How can i insert this list containing task Records into database .

Since the maximum size of DML is 10000 using list,thats why Insert will fail if list size exceed 10k.

I also want to send an email to user once the Insert is succesfull.

 

Sample code

List<SMP_Step__c> SMPSteps=new List<SMP_Step__c>();

SMP_Step__c temp=new SMP_Step__c(name='AnkitTest',Step_Name__c='tasktestbatch',Step_Type__c='Task',SMP_Template__c='a0PU0000001eX12');
for(Integer i=1;i<=50000;i++)
{
    SMPSteps.add(temp);
 
}

Now this List SMPSteps has 50000 records ,so how to proceed in this type of scenario.

Plz help.

i want to pass a list of task records 

say 

List<Task> Tasklist 

to the batch class for insertion.

How to call Batch class for this list of tasks.

I have an Id field which is passed as an arguement to controller on a VF page.

 

i want to populate this Id field as a default value in an <Apex:inputfield> column

 

say <apex:inputField value="{!Applied_SMP__c.Assign_To__c}"/>

 

 

so I want to populate this input field with the parameter that is passed to controller from some other VF page.

 

How to achieve this.

plz help

I am using extension for a Custom Object .

Sample code:

 

<apex:page standardcontroller="Applied_SMP__c" extensions="ApplyAccountSMPAgain">
<apex:PageBlock >
<apex:pageMessages />
<apex:form >
<apex:pageblocksection title="Apply SMP" >
<apex:panelGrid columns="2">
<apex:panelGroup >
<b><label>SMP</label></b>&nbsp;&nbsp;&nbsp;&nbsp;
<apex:outputText value="{!name}"/>
</apex:panelGroup></apex:panelGrid>
<br/>
<apex:inputField value="{!Applied_SMP__c.Assign_To__c}"/>
<apex:inputField value="{!Applied_SMP__c.Start_Date__c}"/>
</apex:pageblocksection>

 

 

I want to use the user entered values in above two fields in controller.

How to capture these values in controller??

Please help

Hi Everyone,

 

I need to create a dropdown field on Visualforce page which should display the list of Users based on a query.

Then I need to use the chosen  value in my Controller.

 

How to achieve this??

Plz help its urgent 

 

Thanks,

Ankit

I want to use same Custom button on Page layouts of 4 different standard objects i.e. Account,Opportunity,Contact and Campaign.

The click of this button will redirect a User to a VF page.

Visualforce Page:

 

<apex:page standardController="Account" extensions="MyAccountController" >
<apex:pageBlock >
<apex:form >
<apex:pageBlockSection title="Corporate Templates">

 <apex:repeat value="{!CorporateSMPs}" var="d" id="corpSMPs">
 <apex:commandlink action="{!openSMP}" value="{!d.Name}">
 <apex:param name="paramName" assignTo="{!SMPName}" value="{!d.Name}" />
 </apex:commandlink>
   <br/>
 </apex:repeat>

</apex:pageBlockSection>
<apex:pageBlockSection title="Zone Templates">
<apex:repeat value="{!ZoneSMPs}" var="d" id="ZoneSMPs">
 <apex:outputlink value="/{!d.Id}">{!d.Name}</apex:outputLink>
   <br/>
 </apex:repeat>



</apex:pageBlockSection>
<apex:pageBlockSection title="Agent Templates">
<apex:repeat value="{!AgentSMPs}" var="d" id="AgentSMPs">
 <apex:outputlink value="{!d.Id}">{!d.Name}</apex:outputLink>
   <br/>
 </apex:repeat>
</apex:pageBlockSection>
</apex:form>
</apex:pageBlock>
</apex:page>

 

I have implemented this button on Account object Only.

Now I want to use this button on Opportunity,contact and Campaign as well.

I just need the Id of clicked Object page on click of button in the Controller.

 

Controller Code:

public class MyAccountController
{
    public Account acct;
    public String accNum;
    public Id AccId;
    public String SMPName{set;get;}
    public Account Act;
     public MyAccountController(ApexPages.StandardController stdController)
    {
       this.acct=(Account)stdController.getRecord();
       Act=[Select Id,Target__c,AccountNumber from Account where Id=:acct.Id];
       accNum=Act.AccountNumber;
      AccId=Act.Id;
    }
          // List<SMP_Template__c> CorporateSMPs = [SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:acct.Target__c and S.SMP_Office_Type__c='Corporate'];
    // List<SMP_Template__c> ZoneSMPs=[SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:acct.Target__c and S.SMP_Office_Type__c='Zone'];
    // List<SMP_Template__c> AgentSMPs=[SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:acct.Target__c and S.SMP_Office_Type__c='Agent'];
    public Pagereference openSMP()
    {
    return new PageReference('/apex/ApplyAccountSMP?Name='+SMPName+'&accountNumber='+accNum);
    }
    public List<SMP_Template__c> getCorporateSMPs()
    {
    If(acct!=null){
     //Act=[Select Id,Target__c,Name from Account where Id=:acct.Id];
   
       List<SMP_Template__c> CorporateSMPs=new List<SMP_Template__c> ([SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:Act.Target__c and S.SMP_Office_Type__c='Corporate']);
      return(CorporateSMPs);
 }
 return null;      }
 public List<SMP_Template__c> getZoneSMPs()
    {
    If(acct!=null){
    Account Act=[Select Id,Target__c from Account where Id=:acct.Id];
       List<SMP_Template__c> ZoneSMPs=new List<SMP_Template__c> ([SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:Act.Target__c and S.SMP_Office_Type__c='Zone']);
      return(ZoneSMPs);
 }
 return null;      }
 public List<SMP_Template__c> getAgentSMPs()
    {
    If(acct!=null){
    Account Act=[Select Id,Target__c from Account where Id=:acct.Id];
       List<SMP_Template__c> ZoneSMPs=new List<SMP_Template__c> ([SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:Act.Target__c and S.SMP_Office_Type__c='Agent']);
      return(ZoneSMPs);
 }
 return null;      }
 }

 

Kindly tell me if I can bring the Ids of any object in the controller.

 

Thanks,

Ankit

 

 

I have a custom object named Gecon__c.

 

Also,my client has enabled custom lookups on tasks .

So i have lookup to Gecon__c on task Object.

 

Every time a task is created for Account standard Object,task's WhatId is populated to AccountId and that custom lookup is populated as the Gecon__c record.

 

Now here is my problem:

 

Every time a task is created for that Account record,it is coming under Activities related list for that Gecon__c record and not under Open Activities related list for that Gecon__c record.

Similarly when a task is completed ,it is not reflecting under the Activity history related list on that Gecon__c record page but is reflecting under Activities related list only.

I think this is happening because there is a custom lookup created for Gecon__c object.

how to get rid of this Activities tab on Gecon__c record page.

plzz help ....

i want to pass a list of task records 

say 

List<Task> Tasklist 

to the batch class for insertion.

How to call Batch class for this list of tasks.

I am using extension for a Custom Object .

Sample code:

 

<apex:page standardcontroller="Applied_SMP__c" extensions="ApplyAccountSMPAgain">
<apex:PageBlock >
<apex:pageMessages />
<apex:form >
<apex:pageblocksection title="Apply SMP" >
<apex:panelGrid columns="2">
<apex:panelGroup >
<b><label>SMP</label></b>&nbsp;&nbsp;&nbsp;&nbsp;
<apex:outputText value="{!name}"/>
</apex:panelGroup></apex:panelGrid>
<br/>
<apex:inputField value="{!Applied_SMP__c.Assign_To__c}"/>
<apex:inputField value="{!Applied_SMP__c.Start_Date__c}"/>
</apex:pageblocksection>

 

 

I want to use the user entered values in above two fields in controller.

How to capture these values in controller??

Please help

I want to use same Custom button on Page layouts of 4 different standard objects i.e. Account,Opportunity,Contact and Campaign.

The click of this button will redirect a User to a VF page.

Visualforce Page:

 

<apex:page standardController="Account" extensions="MyAccountController" >
<apex:pageBlock >
<apex:form >
<apex:pageBlockSection title="Corporate Templates">

 <apex:repeat value="{!CorporateSMPs}" var="d" id="corpSMPs">
 <apex:commandlink action="{!openSMP}" value="{!d.Name}">
 <apex:param name="paramName" assignTo="{!SMPName}" value="{!d.Name}" />
 </apex:commandlink>
   <br/>
 </apex:repeat>

</apex:pageBlockSection>
<apex:pageBlockSection title="Zone Templates">
<apex:repeat value="{!ZoneSMPs}" var="d" id="ZoneSMPs">
 <apex:outputlink value="/{!d.Id}">{!d.Name}</apex:outputLink>
   <br/>
 </apex:repeat>



</apex:pageBlockSection>
<apex:pageBlockSection title="Agent Templates">
<apex:repeat value="{!AgentSMPs}" var="d" id="AgentSMPs">
 <apex:outputlink value="{!d.Id}">{!d.Name}</apex:outputLink>
   <br/>
 </apex:repeat>
</apex:pageBlockSection>
</apex:form>
</apex:pageBlock>
</apex:page>

 

I have implemented this button on Account object Only.

Now I want to use this button on Opportunity,contact and Campaign as well.

I just need the Id of clicked Object page on click of button in the Controller.

 

Controller Code:

public class MyAccountController
{
    public Account acct;
    public String accNum;
    public Id AccId;
    public String SMPName{set;get;}
    public Account Act;
     public MyAccountController(ApexPages.StandardController stdController)
    {
       this.acct=(Account)stdController.getRecord();
       Act=[Select Id,Target__c,AccountNumber from Account where Id=:acct.Id];
       accNum=Act.AccountNumber;
      AccId=Act.Id;
    }
          // List<SMP_Template__c> CorporateSMPs = [SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:acct.Target__c and S.SMP_Office_Type__c='Corporate'];
    // List<SMP_Template__c> ZoneSMPs=[SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:acct.Target__c and S.SMP_Office_Type__c='Zone'];
    // List<SMP_Template__c> AgentSMPs=[SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:acct.Target__c and S.SMP_Office_Type__c='Agent'];
    public Pagereference openSMP()
    {
    return new PageReference('/apex/ApplyAccountSMP?Name='+SMPName+'&accountNumber='+accNum);
    }
    public List<SMP_Template__c> getCorporateSMPs()
    {
    If(acct!=null){
     //Act=[Select Id,Target__c,Name from Account where Id=:acct.Id];
   
       List<SMP_Template__c> CorporateSMPs=new List<SMP_Template__c> ([SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:Act.Target__c and S.SMP_Office_Type__c='Corporate']);
      return(CorporateSMPs);
 }
 return null;      }
 public List<SMP_Template__c> getZoneSMPs()
    {
    If(acct!=null){
    Account Act=[Select Id,Target__c from Account where Id=:acct.Id];
       List<SMP_Template__c> ZoneSMPs=new List<SMP_Template__c> ([SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:Act.Target__c and S.SMP_Office_Type__c='Zone']);
      return(ZoneSMPs);
 }
 return null;      }
 public List<SMP_Template__c> getAgentSMPs()
    {
    If(acct!=null){
    Account Act=[Select Id,Target__c from Account where Id=:acct.Id];
       List<SMP_Template__c> ZoneSMPs=new List<SMP_Template__c> ([SELECT S.SMP_Id__c,S.Name from SMP_Template__c S where S.Is_Available__c='Yes'and S.Target__c=:Act.Target__c and S.SMP_Office_Type__c='Agent']);
      return(ZoneSMPs);
 }
 return null;      }
 }

 

Kindly tell me if I can bring the Ids of any object in the controller.

 

Thanks,

Ankit