• ssss
  • NEWBIE
  • 5 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 29
    Questions
  • 20
    Replies

Hi All,

 

I am new to webservices concept.i want to do sample app with webservices using java or apex

Plz tell me the requirements for the sample app and step by step process to finish the sample application.

 

Plz help me...

 

Thanks in advance,

manju

  • August 10, 2010
  • Like
  • 0

Hi All,

 

I want to do certification on salesforce.If any one know which material is usefu Plz guide me.

If any dumps are there plz send me those links.Plz guide me in properway.

 

Thanks in advance,

Manu

  • June 22, 2010
  • Like
  • 0

Hi All,

 

 I have 2 fileds.1.check box.2.Text Area.

 

My Requirement is if we click on check box user should able to enter a value in textArea field other wise i want to dispaly textArea filed as greayout.So user cant to enter a textArea filed.If any one knows plz tell me how to achieve this functionality using salesforce.

 

Thanks in advance,

Manu..

 

  • January 25, 2010
  • Like
  • 0

hi,

 

I declared one inutFiled in visualforce as type lookup by the following code.

 

<apex:inputField id="sfn" value="{!House_Bill_Of_Ladding__c.SFN_Number__c}"  >

 

once i enter the value in inputFiled through lookup  i have to capture the value in apex controller .

 

Plz tell me how to capture the value with example.

 

Thanks in advance,

Manu..

 

  • January 20, 2010
  • Like
  • 0

Hi All,

 

I am trying to send the values from controller to visualforce input text filed through getters and setters.But here i am getting query exception.

 

mycode is as follows:

 

<apex:page standardController="House_Bill_Of_Ladding__c" extensions="x1_validate">
 <apex:form> 
    <apex:outputLabel value="SFN Control No." /></td>       
    <apex:inputField id="sfn" value="{!House_Bill_Of_Ladding__c.SFN_Number__c}" style="width:82px">
                   </apex:inputField> </td>  
    <apex:outputLabel value="Voyage No." ></apex:outputLabel></td>    
    <apex:inputText id="voy" value="{!hblvoyage}" style="width:82px">      
                       </apex:inputText> </td>             
                        
    <apex:commandLink value="Get" />
 
 
 </apex:form>
</apex:page>

 

public class x1_validate
{
 private House_Bill_Of_Ladding__c  curr_record =new House_Bill_Of_Ladding__c();
 Sea_Foot_Note__c SFN_voyage;

 public string hblvoyage{get; set;}
 public x1_validate(ApexPages.StandardController controller)
  {
   this.curr_record=(House_Bill_Of_Ladding__c)controller.getRecord();
   string curr_sfn=curr_record.SFN_Number__c;
   SFN_voyage=[SELECT Voyage_Number__c FROM  Sea_Foot_Note__c where SFN_Number__c =: curr_sfn];     
  }
 
  public Sea_Foot_Note__c gethblvoyage()
   {   
    return SFN_voyage;
   }
   public void sethblvoyage(Sea_Foot_Note__c s)
   {
    this.SFN_voyage=s;
   }
 }

if i declared SFN_voyage return type as Sea_Foot_Note__c[] i can rectify the query exception.but again i am getting the following error.

 

Error: Compile Error: Return value must be of type: SOBJECT:chiranjeevi__Sea_Foot_Note__c at line 16 column 5

 

plz tell me is i am going in a correct way or not.i know that through setters and getters only we can pass the values from controller to visualforce.i can able to pass  string value.but here i was unable to pass object value.if any one knows other solution plz give me example or plz check my code.my requirement is if i click on link i should populate the value to input text.

 

plzz help me.

 

Thanks in advance,

Manu..

 

 

 

  • January 20, 2010
  • Like
  • 0

hi all,

 

I have 2 VFpages with three common fileds like SFN number,voyage number,vessel name.Here i dont want re enter the same values in second page.So in the second VF page i can get the value of object from first page through lookup relation for one filed i.e SFN_Number.In lookup relation i can able to get only one value.So i want to get the values of remaing two fields for the corresponding SFN Number.In controller i am checking for the equality of SFN number  of tw pages in query.If i click on the link in second page i want to get the values from controller to input text fileds of second page.Here i am not able to pass the value from controller to particular input filed in second page.So plz tell me how to pass the object value from controller to inputfield of vf page.

 

My sample code is as follows:

controller:

 

public class hbl_validate
{

 private House_Bill_Of_Ladding__c  curr_record =new House_Bill_Of_Ladding__c();

public hbl_validate(ApexPages.StandardController controller)
  {

    this.curr_record=(House_Bill_Of_Ladding__c)controller.getRecord();

   }

   public void getvalues()
  {
    
    string curr_sfn=curr_record.SFN_Number__c;  
    Sea_Foot_Note__c[] SFN_LKUP_VALUE=

       SELECT SFN_Number__c,Vessel_Name__c,Voyage_Number__c   FROM  Sea_Foot_Note__c where SFN_Number__c =: curr_sfn];

 

  //Here i want to send the value of Vessel_Name__c,Voyage_Number__c to the following second page corresponding input fileds .

}

}

 

Vf page

<apex:page standardController="House_Bill_Of_Ladding__c"   extensions="hbl_validate">

<apex:form id="frm" >

<apex:outputLabel value="SFN Control No." />

<apex:inputField id="sfn" value="{!House_Bill_Of_Ladding__c.SFN_Number__c}" />

<apex:outputLabel value="Voyage No." />

<apex:inputField id="vref" value="{!House_Bill_Of_Ladding__c.Voyage_Number__c}" >

<apex:outputLabel value="Vessel Name" />

<apex:inputField id="vessel" value="{!House_Bill_Of_Ladding__c.Vessel_Name__c}" />

<apex:commandLink value="Get"/>

</apex:form>

</apex:page>

 

I have to implement this functionality in many pages.If any one knows plz help me.

 

Thanks in advance,

Manu..

  • January 19, 2010
  • Like
  • 0

Hi All,

 

I have 2 objects which is having 3 common fileds like SFN Number,voyage number,vessel name and some other different fileds.In these 2 objects SFN Number is required filed.In the first object i saved one record with sfn number like "SFN12".In the second object if enter the same sfn number i want to populate the voyage number,vessel name from object 1 to object 2.

 

If any one knows how to populate the values from one object to another object plz help me.

 

Thanks in advance,

Manu..

 

 

  • January 18, 2010
  • Like
  • 0

In my application if i click on "ok" alert will be raised.If we click on"ok" button it should save the record and go back to home tab.If we click on "cancel" i dont want to save the record and simply go back to home tab.This is my requirement.Here i am facing the problem how to call methods from apex controoler to java script.

If any one knows plz help me.

 

My sample code is as follows:

 

VF page

 

<apex:page standardController="Holding_Instruments__c" extensions="aa_validate">
<script type="text/javascript">

function valid()
{
 var val = confirm ("Do U Want To Save The Record?")
 if (val)
 {
  saveandmove();//here i want to call the method from apex controller
 }
 
 else
 {
  dontsave();//here i want to call the method from apex controller
 }
 
}


</script>
     <apex:form >
     <apex:outputLabel value="SFN Control No." />
     <apex:inputField id="sfn" value="{!Holding_Instruments__c.SFN_Number__c}"/>
     <apex:commandButton value="OK"  onclick="return valid()"  />
    </apex:form>
</apex:page>

 

Controller:

 

public class aa_validate
{
  ApexPages.StandardController con;
  public aa_validate(ApexPages.StandardController controller)
  {
      this.con = controller;
  }
  public void save()
  {
  try
  {
   con.save();
  }
  catch(Exception ex1)
  {
  }
  }
  public PageReference saveandmove()
 {
  con.save();
  PageReference pr =new PageReference('https://ap1.salesforce.com/home/home.jsp'); 

  pr.setRedirect(true);
  return pr;
 }
 public PageReference dontsave()
 {
 
  PageReference pr =new PageReference('https://ap1.salesforce.com/home/home.jsp');

  pr.setRedirect(true);
  return pr;
 }
}

 

Thanks In Advance,

Manu..

  • January 11, 2010
  • Like
  • 0

hi,

 

In my applicaiton i already disabled "save" button and when we enter a value in inptutFiled save button was enabled.

In input filed it is happend.But in picklist and date fields while  selecting a value save button is not enabled.So plz tell me how to enable button while selectin a picklist and date filed values.

 

my sample code is aaas follows.here SFN_Number__c is text filed and Clearing_Category__c is picklist in salesforce.

 

 VF page code:

<apex:inputField id="sfn" value="{!Sea_Foot_Note__c.SFN_Number__c}">
                   <apex:actionSupport event="onkeyup" action="{!disableEnable}" rerender="buttonSection"/></apex:inputField>

<apex:inputField id="category" value="{!Sea_Foot_Note__c.Clearing_Category__c}">
                       <apex:actionSupport event="onkeyup" action="{!disableEnable}" rerender="buttonSection"/></apex:inputField>

 

controller:

 

public void disableEnable()
 {
  setButtonStatus('save', ENABLED);
 }

 

 

Thanks in advance,

manu..

  • January 08, 2010
  • Like
  • 0

Hi All,

 

In my VF page some input fileds and dependent pick lists are there.I am overriding the standard save button.i had created dependent picklists using Vf with apex(using <apex:selectList>).All input fileds are saved but picklist values are not saved.if any one knows tell me the solution.

 

Thanks in advance,

manu..

  • January 05, 2010
  • Like
  • 0

Hi,

 

In my application is having 13 objects.In that i had already connected one button to one Vf page like this. 

Standard Buttons Links-->

override-->Tab, override-->View,override-->Edit,override-->New.

Again i had reset the tab,view,edit,new.Now i am connecting the new VF page to same tab.Here i am not able to see my page in tab,view,edit,new.how can i connect VF page to button.

 

Thanks in advance,

Manu..

 

  • January 04, 2010
  • Like
  • 0

Hi All,

 

In my aplliction is having 6 pageBlockSections.Each section is having 8 fileds.

I am facing the problem while clearing the fileds.If the fileds are not under pageBlockSection i can clear the fileds by using java script.

 

ex:

 <script>

   function clearflds()

   {

     document.getElementById('{!$Component.frm.details}').value=null;

   }

 </script>

 

<apex:inputField id="details" value="{!Sea_Foot_Note__c.Issue_Details__c}"/>  

<apex:commandButton value="Cancel" onclick="clearflds()" />

 

But here i am facing the problem how to clear the pageBlockSection inputFields.

 

Ex:

 

One Section  is having 4 fileds.They are one TextArea Field(Issue Details),2 Picklist Fields(Any issues,Clearing Category),and one Date Field(Control Date).By clicking on the New Button i can enter the values.By clicking on the save button i can save the record.By clicking on the cancel button i was unable to clear the fields.

 

My requirement is when i click on the cancel button i have to clear the values of 4 input fileds.These 4 fileds are under pageBlockSection.

 

Plz tell me if any one knows.

My sample code is as follows:

 

<apex:page standardController="Sea_Foot_Note__c" >

 <apex:form id="frm" > 
    <apex:pageBlock>
       <apex:pageBlockSection columns="2" showHeader="true" title="SFN Main Entity">
          <apex:inputField id="issue" value="{!Sea_Foot_Note__c.Any_Issues__c}"/>               
          <apex:inputField id="details" value="{!Sea_Foot_Note__c.Issue_Details__c}"/>            
          <apex:inputField id="cdate" value="{!Sea_Foot_Note__c.Control_Date__c}"/>                       
          <apex:inputField id="category" value="{!Sea_Foot_Note__c.Clearing_Category__c}"/>
        </apex:pageBlockSection>
        <apex:pageBlockButtons>
           <apex:commandButton value="New"/>
           <apex:commandButton value="Cancel" />
        </apex:pageBlockButtons>        
    </apex:pageBlock>         
  </apex:form>
</apex:page>

 

Thanks in advance,

Manu..

  • December 22, 2009
  • Like
  • 0

Hi All,

 

In my application i am able to open the new window using java script but i am unable to close the window.plz tell me how to close the child window.

My code is as follows:

 

VF1:

 

<apex:page standardController="CAF_Charge__c" extensions="g_popupwindow">
<h1> CAF Charge Detail </h1>
<apex:form >
<table>
 <tr>
  <td>
    <apex:outputText value="Charges Head"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <apex:inputText value="{!parentTextId}"/>
    <apex:commandLink value="search" onclick="popup('/apex/ge2')"/><br/>
  </td>
 </tr>
 <tr>
  <td>
    <apex:outputText value="Description Of Charges"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <apex:inputtext value="{!doc}"/>
  </td>
 </tr>
 <tr>
  <td>
    <apex:outputText value="Percentage"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <apex:inputtext value="{!percentage}"/>  
  </td>
 </tr>
<tr>
   <td>
    <apex:commandButton action="{!save}" value="Save"  />
    <apex:commandButton value="New"  />
   </td>
</tr> 
</table>

<script>
function popup(url)
{
    newwindow=window.open(url,'kkkk','width=400,height=400,top=0,toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,re sizable=yes,left=60,screenX=60,top=100,screenY=100');
    if (window.focus)
    {
     kkkk.focus()
    }
    newwindow.close();
}
</script>

</apex:form>
</apex:page>

 

VF2:

 

<apex:page standardController="CAF_Charge__c" extensions="g_popupwindow">
<apex:form >
<apex:pageblock >
<apex:pageBlockSection >
      <apex:pageblocksectionItem >
          <apex:outputlabel value="Charges Head" for="SelectedFromPickList" />     
          <apex:selectList value="{!selectedRecordId}" size="0" id="SelectedFromPickList">
          <apex:actionSupport event="onchange" reRender="Course" action="{!something}"/>        
          <apex:selectOptions value="{!ChargeNames}"/>
          </apex:selectList>
      </apex:pageblocksectionItem> 
      <apex:commandLink value="ok" onclick="popup_close()"/>
   <!--   <apex:pageBlockSectionItem >
     
          <apex:selectRadio value="{!selectedRecordId1}" id="Course" layout="pageDirection" >
               <apex:selectOptions value="{!Charge_Field}"/>
                <apex:actionSupport event="onchange" action="{!nothing}" status="status" reRender="btnsave,btncncel"/>
             </apex:selectRadio>
       
      </apex:pageblocksectionItem>-->  
                                      
                              
  </apex:pageblocksection>
 </apex:pageblock>
 
 <script language="javascript" type="text/javascript">
   function popup_close()
   {
    
   newwindow= window.close();
    
   }
    
     </script>  
</apex:form>
</apex:page>

 

controller:

public class g_popupwindow
{

    public g_popupwindow(ApexPages.StandardController controller) {
    }
      public string parentText;
      public string selectedRecord;
      public string selectedCharge;
     
      Public string chargeshead{get;set;}
      Public string doc{get;set;}
      Public string percentage{get;set;}
      public string chead;
      List<SelectOption> values = new List<SelectOption>();
      public string getparentTextId()
            {
       return parentText;
      }
      public void setparentTextId(string values)
      {     
        this.parentText=values;
      }
   //
    public string getselectedRecordId()
    {
        return selectedRecord;
    }
    public void setselectedRecordId(string s)
    {     
        this.selectedRecord=s;
    }
    public string getselectedRecordId1()
    {
        return selectedCharge;
    }
    public void setselectedRecordId1(string s)
    {     
        this.selectedCharge=s;
    }
  
   
    public void something()
    {
    setselectedRecordId1(selectedRecord);
    }
    public void nothing()
    {
    }
    //....! Dispalying charge values as picklist
    public List<SelectOption> getChargeNames()
    {
      List<SelectOption> options = new List<SelectOption>();
      List<chiranjeevi__CAF_Charge__c> chargelist= new List<chiranjeevi__CAF_Charge__c>();
      chargelist = [Select chiranjeevi__Charges_Head__c FROM chiranjeevi__CAF_Charge__c ];
      options.add(new SelectOption('--None--','--None--'));
    
      for (Integer j=0;j<chargelist.size();j++)
      {
       options.add(new SelectOption(chargelist[j].chiranjeevi__Charges_Head__c,chargelist[j].chiranjeevi__Charges_Head__c));
      }
      return options;
    }
   
    //....! storing selected charge from picklist to radio buton here
   
    public list<selectoption> getCharge_Field() 
    {
      List<SelectOption> SelectedFromPickList = new List<SelectOption>(); 
      if(selectedRecord == NULL)      
      {
        SelectedFromPickList.add(new selectoption('','NONE'));
      }
       
      else
      {
         SelectedFromPickList.add(new selectoption('',' '+selectedRecord));
      }
         return SelectedFromPickList;
    }  
}

 

plz tell me how to do it.

Thanks in advance,

Manu..

  • December 18, 2009
  • Like
  • 0

Hi Everyone,

 

In my appliaction parent window is having 3 fields and one link is there.when we click on the link child window opens and dispalys the lsit of values as picklist.

My requirement is display the child window picklist value into parent window text box.I am able to dispaly the values in child window.plz tell me how to display the value from child window to parent window.

 

My code is as follows.

 

Parent window VF page:

 

<apex:page standardController="CAF_Charge__c" extensions="g_popupwindow">
<h1> CAF Charge Detail </h1>
<apex:form >
<table>
 <tr>
  <td>
    <apex:outputText value="Charges Head"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <apex:inputText value="{!parentTextId}"/>
    <apex:commandLink value="search" onclick="popup('/apex/ge2')"/><br/>
  </td>
 </tr>
 <tr>
  <td>
    <apex:outputText value="Description Of Charges"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <apex:inputtext value="{!doc}"/>
  </td>
 </tr>
 <tr>
  <td>
    <apex:outputText value="Percentage"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <apex:inputtext value="{!percentage}"/>  
  </td>
 </tr>
<tr>
   <td>
    <apex:commandButton action="{!save}" value="Save"  />
    <apex:commandButton value="New"  />
   </td>
</tr> 
</table>


<script>
function popup(url)
{
    newwindow=window.open(url,'name','width=400,height=400,top=0,toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,re sizable=yes,left=60,screenX=60,top=100,screenY=100');
    if (window.focus)
    {
     newwindow.focus()
    }
}
</script>

</apex:form>
</apex:page>

 

Child window VF page:

 

<apex:page standardController="CAF_Charge__c" extensions="g_popupwindow">
<apex:form >
<apex:pageblock >
<apex:pageBlockSection >
      <apex:pageblocksectionItem >
          <apex:outputlabel value="Charges Head" for="values" />     
          <apex:selectList value="{!selectedRecordId}" size="1" id="values">
          <apex:actionSupport event="onchange" reRender="Course" action="{!something}"/>
               <apex:selectOptions value="{!ChargeNames}"/>
           </apex:selectList>
      </apex:pageblocksectionItem> 
      <apex:pageBlockSectionItem >
           <apex:selectRadio value="{!selectedRecordId1}" id="Course" layout="pageDirection" >
                <apex:selectOptions value="{!Charge_Field}"/>
                <apex:actionSupport event="onchange" action="{!nothing}" status="status" reRender="btnsave,btncncel"/>
             </apex:selectRadio>
       
      </apex:pageblocksectionItem>                                                       
                    
  </apex:pageblocksection>
 </apex:pageblock>
</apex:form>
</apex:page>

 

Controller:

 

public class g_popupwindow
{

    public g_popupwindow(ApexPages.StandardController controller) {
    }
      public string parentText;
      public string selectedRecord;
      public string selectedCharge;
     
      Public string chargeshead{get;set;}
      Public string doc{get;set;}
      Public string percentage{get;set;}
      public string chead;
      List<SelectOption> values = new List<SelectOption>();
      public string getparentTextId()
            {
       return parentText;
      }
      public void setparentTextId(string values)
      {     
        this.parentText=values;
      }
  
    public string getselectedRecordId()
    {
        return selectedRecord;
    }
    public void setselectedRecordId(string s)
    {     
        this.selectedRecord=s;
    }
    public string getselectedRecordId1()
    {
        return selectedCharge;
    }
    public void setselectedRecordId1(string s)
    {     
        this.selectedCharge=s;
    }
  
   
    public void something()
    {
    setselectedRecordId1(selectedRecord);
    }
    public void nothing()
    {
    }
    //....! Dispalying charge values as picklist
    public List<SelectOption> getChargeNames()
    {
      List<SelectOption> options = new List<SelectOption>();
      List<chiranjeevi__CAF_Charge__c> chargelist= new List<chiranjeevi__CAF_Charge__c>();
      chargelist = [Select chiranjeevi__Charges_Head__c FROM chiranjeevi__CAF_Charge__c ];
      options.add(new SelectOption('--None--','--None--'));
    
      for (Integer j=0;j<chargelist.size();j++)
      {
       options.add(new SelectOption(chargelist[j].chiranjeevi__Charges_Head__c,chargelist[j].chiranjeevi__Charges_Head__c));
      }
      return options;
    }
   
    //....! storing selected charge from picklist to radio buton here
   
    public list<selectoption> getCharge_Field() 
    {
      List<SelectOption> values = new List<SelectOption>(); 
      if(selectedRecord == NULL)      
      {
        values.add(new selectoption('','NONE'));
      }
       
      else
      {
         values.add(new selectoption('',' '+selectedRecord));
      }
         return values;
    }  
}

 

If any one knows plz guide me.

 

Thanks in advance,

Manu..

 

 

  • December 18, 2009
  • Like
  • 0

Hi,

 

i want to call the method with out command link.plz tell me how to modify this code.i dont want display links for the second and third column in the data table.

 

my code is as follows:

 

<apex:page standardController="CAF_Charge__c" extensions="testwindow">

<apex:form >

<apex:dataTable value="{!DesCharge}" var="a" cellPadding="4" border="1"  >

<apex:column headervalue="Charge header information" >
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Charges_Head__c}"/>
{!a.Charges_Head__c}</apex:commandLink></apex:column>

<apex:column headervalue="Description of charge">
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Description_Of_Charges__c}"/>
{!a.Description_Of_Charges__c}</apex:commandLink></apex:column>

<apex:column headervalue="Percentage">
  <apex:commandLink action="{!filltextval1}">
  <apex:param name="name1" value="{!a.Percentage__c}"/>
  {!a.Percentage__c}</apex:commandLink>
</apex:column>


</apex:dataTable>

</apex:form>
</apex:page>

 

Controller:

 

global class testwindow
{
    

    public testwindow(ApexPages.StandardController controller) {

    }
    Public String Charge;
    Public string chargeshead{get;set;}
    Public string doc{get;set;}
    Public string percentage{get;set;}
      
    public List<chiranjeevi__CAF_Charge__c> getDesCharge()
    {
     List<chiranjeevi__CAF_Charge__c> descharge=[select chiranjeevi__Charges_Head__c,chiranjeevi__Description_Of_Charges__c,chiranjeevi__Percentage__c  from chiranjeevi__CAF_Charge__c  limit 10];
     return descharge;
    }
    
    Public void filltextval1()
    {
    chargeshead= apexpages.currentpage().getparameters().get('name1');
    }
   
   
   
   
}

 

Thanks

 

 

  • December 15, 2009
  • Like
  • 0

hi,

 

I want to do the lookups as in sales force using visual force with apex.If any one knows plz send me the example that will be helpful to me.

 

Thanks in advance,

manu...

 

 

 

  • December 12, 2009
  • Like
  • 0

Hi everyone,

 

in my application i was displaying the dataTable.but i want to capture the dataTable value using apex class.

 

plz help me.

my code is

 

VF page:

 

<apex:page standardController="CAF_Charge__c" extensions="popupwindow">
<apex:form >
<apex:dataTable value="{!DesCharge}" var="a" cellPadding="4" border="1"  >

<apex:column headervalue="Charge header information">
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Charges_Head__c}"/>
{!a.Charges_Head__c}</apex:commandLink></apex:column>

<apex:column headervalue="Description of charge">
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Description_Of_Charges__c}"/>
{!a.Description_Of_Charges__c}</apex:commandLink></apex:column>

<apex:column headervalue="Percentage">
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Percentage__c}"/>
{!a.Percentage__c}</apex:commandLink></apex:column>

</apex:dataTable>

</apex:form>
</apex:page>

 

controller:

 

public class popupwindow
{

    public popupwindow(ApexPages.StandardController controller) {

    }
  
    Public string chargeshead{get;set;}
    Public string doc{get;set;}
    Public string percentage{get;set;}
      
    public List<chiranjeevi__CAF_Charge__c> getDesCharge()
    {
     List<chiranjeevi__CAF_Charge__c> descharge=[select chiranjeevi__Charges_Head__c,chiranjeevi__Description_Of_Charges__c,chiranjeevi__Percentage__c  from chiranjeevi__CAF_Charge__c  limit 10];
     return descharge;
    }

    Public void filltextval1()
    {
    chargeshead= apexpages.currentpage().getparameters().get('name1');
    }
   
   
}

 

plz help me with code.

 

Thanks,

manu..

  • December 12, 2009
  • Like
  • 0

Hi Everyone,

 

How to generate a popup window using visual force page.

 

plz help me with the code.

 

Thanks,

manu..

  • December 12, 2009
  • Like
  • 0

Hi Everyone,

 

I want to populate the data table record value to inputtext field.it means dataTable is one page and input text field in another page.

 

Plz tell me the way through which concept we can achieve this.

 

Thanks ,

Manu..

  • December 11, 2009
  • Like
  • 0

Hi every one,

 

I am facing the problem with datatable in visual force with apex.In my application i want to display the table as three fields with coreesponding values.But here i am getting 3 tables.How to make it as single table.

 

Here my code is as follows.

 

VFPage

 

<apex:page standardController="CAF_Charge__c" extensions="popupwindow">
<apex:form >
<apex:dataTable value="{!DesCharge}" var="a" cellPadding="4" border="1" >
<apex:column headervalue="Charge header information">
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Charges_Head__c}"/>
{!a.Charges_Head__c}</apex:commandLink></apex:column>
</apex:dataTable>
<apex:dataTable value="{!DesCharge}" var="a" cellPadding="4" border="1" >
<apex:column headervalue="Description of charge">
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Description_Of_Charges__c}"/>
{!a.Description_Of_Charges__c}</apex:commandLink></apex:column>
</apex:dataTable>

<apex:dataTable value="{!DesCharge}" var="a" cellPadding="4" border="1">
<apex:column headervalue="Percentage">
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Percentage__c}"/>
{!a.Percentage__c}</apex:commandLink></apex:column>
</apex:dataTable>

</apex:form>
</apex:page>

 

Apex Class

 

public class popupwindow
{

    public popupwindow(ApexPages.StandardController controller) {

    }
  

    Public string chargeshead{get;set;}
    Public string doc{get;set;}
    Public string percentage{get;set;}
   

   
    public List<chiranjeevi__CAF_Charge__c> getDesCharge()
    {
     List<chiranjeevi__CAF_Charge__c> descharge=[select chiranjeevi__Charges_Head__c,chiranjeevi__Description_Of_Charges__c,chiranjeevi__Percentage__c  from chiranjeevi__CAF_Charge__c  limit 10];
     return descharge;
    }


    Public void filltextval1()
    {
    chargeshead= apexpages.currentpage().getparameters().get('name1');
    }
   
   
}

 

Thanks,

Manu..

  • December 11, 2009
  • Like
  • 0

Hi All,

 

I am new to webservices concept.i want to do sample app with webservices using java or apex

Plz tell me the requirements for the sample app and step by step process to finish the sample application.

 

Plz help me...

 

Thanks in advance,

manju

  • August 10, 2010
  • Like
  • 0

Hi All,

 

I want to do certification on salesforce.If any one know which material is usefu Plz guide me.

If any dumps are there plz send me those links.Plz guide me in properway.

 

Thanks in advance,

Manu

  • June 22, 2010
  • Like
  • 0

Hi All,

 

In my VF page some input fileds and dependent pick lists are there.I am overriding the standard save button.i had created dependent picklists using Vf with apex(using <apex:selectList>).All input fileds are saved but picklist values are not saved.if any one knows tell me the solution.

 

Thanks in advance,

manu..

  • January 05, 2010
  • Like
  • 0

Hi,

 

In my application is having 13 objects.In that i had already connected one button to one Vf page like this. 

Standard Buttons Links-->

override-->Tab, override-->View,override-->Edit,override-->New.

Again i had reset the tab,view,edit,new.Now i am connecting the new VF page to same tab.Here i am not able to see my page in tab,view,edit,new.how can i connect VF page to button.

 

Thanks in advance,

Manu..

 

  • January 04, 2010
  • Like
  • 0

Hi All,

 

In my aplliction is having 6 pageBlockSections.Each section is having 8 fileds.

I am facing the problem while clearing the fileds.If the fileds are not under pageBlockSection i can clear the fileds by using java script.

 

ex:

 <script>

   function clearflds()

   {

     document.getElementById('{!$Component.frm.details}').value=null;

   }

 </script>

 

<apex:inputField id="details" value="{!Sea_Foot_Note__c.Issue_Details__c}"/>  

<apex:commandButton value="Cancel" onclick="clearflds()" />

 

But here i am facing the problem how to clear the pageBlockSection inputFields.

 

Ex:

 

One Section  is having 4 fileds.They are one TextArea Field(Issue Details),2 Picklist Fields(Any issues,Clearing Category),and one Date Field(Control Date).By clicking on the New Button i can enter the values.By clicking on the save button i can save the record.By clicking on the cancel button i was unable to clear the fields.

 

My requirement is when i click on the cancel button i have to clear the values of 4 input fileds.These 4 fileds are under pageBlockSection.

 

Plz tell me if any one knows.

My sample code is as follows:

 

<apex:page standardController="Sea_Foot_Note__c" >

 <apex:form id="frm" > 
    <apex:pageBlock>
       <apex:pageBlockSection columns="2" showHeader="true" title="SFN Main Entity">
          <apex:inputField id="issue" value="{!Sea_Foot_Note__c.Any_Issues__c}"/>               
          <apex:inputField id="details" value="{!Sea_Foot_Note__c.Issue_Details__c}"/>            
          <apex:inputField id="cdate" value="{!Sea_Foot_Note__c.Control_Date__c}"/>                       
          <apex:inputField id="category" value="{!Sea_Foot_Note__c.Clearing_Category__c}"/>
        </apex:pageBlockSection>
        <apex:pageBlockButtons>
           <apex:commandButton value="New"/>
           <apex:commandButton value="Cancel" />
        </apex:pageBlockButtons>        
    </apex:pageBlock>         
  </apex:form>
</apex:page>

 

Thanks in advance,

Manu..

  • December 22, 2009
  • Like
  • 0

Hi All,

 

In my application i am able to open the new window using java script but i am unable to close the window.plz tell me how to close the child window.

My code is as follows:

 

VF1:

 

<apex:page standardController="CAF_Charge__c" extensions="g_popupwindow">
<h1> CAF Charge Detail </h1>
<apex:form >
<table>
 <tr>
  <td>
    <apex:outputText value="Charges Head"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <apex:inputText value="{!parentTextId}"/>
    <apex:commandLink value="search" onclick="popup('/apex/ge2')"/><br/>
  </td>
 </tr>
 <tr>
  <td>
    <apex:outputText value="Description Of Charges"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <apex:inputtext value="{!doc}"/>
  </td>
 </tr>
 <tr>
  <td>
    <apex:outputText value="Percentage"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <apex:inputtext value="{!percentage}"/>  
  </td>
 </tr>
<tr>
   <td>
    <apex:commandButton action="{!save}" value="Save"  />
    <apex:commandButton value="New"  />
   </td>
</tr> 
</table>

<script>
function popup(url)
{
    newwindow=window.open(url,'kkkk','width=400,height=400,top=0,toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,re sizable=yes,left=60,screenX=60,top=100,screenY=100');
    if (window.focus)
    {
     kkkk.focus()
    }
    newwindow.close();
}
</script>

</apex:form>
</apex:page>

 

VF2:

 

<apex:page standardController="CAF_Charge__c" extensions="g_popupwindow">
<apex:form >
<apex:pageblock >
<apex:pageBlockSection >
      <apex:pageblocksectionItem >
          <apex:outputlabel value="Charges Head" for="SelectedFromPickList" />     
          <apex:selectList value="{!selectedRecordId}" size="0" id="SelectedFromPickList">
          <apex:actionSupport event="onchange" reRender="Course" action="{!something}"/>        
          <apex:selectOptions value="{!ChargeNames}"/>
          </apex:selectList>
      </apex:pageblocksectionItem> 
      <apex:commandLink value="ok" onclick="popup_close()"/>
   <!--   <apex:pageBlockSectionItem >
     
          <apex:selectRadio value="{!selectedRecordId1}" id="Course" layout="pageDirection" >
               <apex:selectOptions value="{!Charge_Field}"/>
                <apex:actionSupport event="onchange" action="{!nothing}" status="status" reRender="btnsave,btncncel"/>
             </apex:selectRadio>
       
      </apex:pageblocksectionItem>-->  
                                      
                              
  </apex:pageblocksection>
 </apex:pageblock>
 
 <script language="javascript" type="text/javascript">
   function popup_close()
   {
    
   newwindow= window.close();
    
   }
    
     </script>  
</apex:form>
</apex:page>

 

controller:

public class g_popupwindow
{

    public g_popupwindow(ApexPages.StandardController controller) {
    }
      public string parentText;
      public string selectedRecord;
      public string selectedCharge;
     
      Public string chargeshead{get;set;}
      Public string doc{get;set;}
      Public string percentage{get;set;}
      public string chead;
      List<SelectOption> values = new List<SelectOption>();
      public string getparentTextId()
            {
       return parentText;
      }
      public void setparentTextId(string values)
      {     
        this.parentText=values;
      }
   //
    public string getselectedRecordId()
    {
        return selectedRecord;
    }
    public void setselectedRecordId(string s)
    {     
        this.selectedRecord=s;
    }
    public string getselectedRecordId1()
    {
        return selectedCharge;
    }
    public void setselectedRecordId1(string s)
    {     
        this.selectedCharge=s;
    }
  
   
    public void something()
    {
    setselectedRecordId1(selectedRecord);
    }
    public void nothing()
    {
    }
    //....! Dispalying charge values as picklist
    public List<SelectOption> getChargeNames()
    {
      List<SelectOption> options = new List<SelectOption>();
      List<chiranjeevi__CAF_Charge__c> chargelist= new List<chiranjeevi__CAF_Charge__c>();
      chargelist = [Select chiranjeevi__Charges_Head__c FROM chiranjeevi__CAF_Charge__c ];
      options.add(new SelectOption('--None--','--None--'));
    
      for (Integer j=0;j<chargelist.size();j++)
      {
       options.add(new SelectOption(chargelist[j].chiranjeevi__Charges_Head__c,chargelist[j].chiranjeevi__Charges_Head__c));
      }
      return options;
    }
   
    //....! storing selected charge from picklist to radio buton here
   
    public list<selectoption> getCharge_Field() 
    {
      List<SelectOption> SelectedFromPickList = new List<SelectOption>(); 
      if(selectedRecord == NULL)      
      {
        SelectedFromPickList.add(new selectoption('','NONE'));
      }
       
      else
      {
         SelectedFromPickList.add(new selectoption('',' '+selectedRecord));
      }
         return SelectedFromPickList;
    }  
}

 

plz tell me how to do it.

Thanks in advance,

Manu..

  • December 18, 2009
  • Like
  • 0

Hi Everyone,

 

I want to populate the data table record value to inputtext field.it means dataTable is one page and input text field in another page.

 

Plz tell me the way through which concept we can achieve this.

 

Thanks ,

Manu..

  • December 11, 2009
  • Like
  • 0

Hi Everybody,

 

Is it possible to genrate a new window in visualforcepage or VF with apex.If possible tell me the code.

 

Thanks,

Manu...

  • December 10, 2009
  • Like
  • 0
Hi Everyone,

 

Iam facing a small problem when iam trying to link my visualforce page to the standard tab.......When i go to objects edit mode and  under Context-Sensitive Help Setting: If i select Open a window using a Visualforce page...

 

Then in the list of visualforce pages available, I cant find my visualforce pages which i have created recently..it is listing up only the pgs which i have created long ago..but not the pgs which i created now...I dont know wats wrong i even deleted some pgs thinking that whether  pg limit exceeded but still i couldnt find the pgs in the list ,So iam unable to link the pages to standard tab now...

 

So wat would be the  Issue and howcan i get out of this issue................PLz help me .......

 

                                                                                                      Thanks & Regards,

                                                                                                             Anu........
  • November 27, 2009
  • Like
  • 0

Hi Everybody,

 

i had created objects in salesforce.while creating the objects defaultly Record Name,Owner,CreatedBy fields are created.Record Name was created at the time of creating object.i dont want to display these defult fields in Edit mode or New mode.I was able to delete Owner,CreatedBy fields in PageLayOut of that particular object.These two fileds have the two options delete,properties.So i was able to delete these two records.

 

Where as RecordName is having only one option i.e properties.So i am unable to delete these filed.

 

Plz tell me the solution.

 

Thanks in advance,

Anu...

Hi,

 

I have a requirement to develop a lookup search in Visualforce. I am able to show the list of of records in a popup window when the user clicks on a magnifying glass. I am not able to pass the selected value from the popup window to the main VF page (Parent window).

 

Can anyone please suggest me on this?

 

Thanks,

Deepa

  • November 23, 2009
  • Like
  • 0

Hi,

I have kept a look up field in the visualforce page using the following code.

 

<apex:inputfield value="{!Account.Associated_Global_Account__c}"/>

 

The lookup field works good but when a user enter the information in the lookup field I am unable to capture it on the apex side.

 

I am not sure how to capture a value from the lookup field from the visualforce page.

 

 

 

 

 

  • November 08, 2009
  • Like
  • 0

Hi,

  I am trying to built an lookup functionality using the visualforce. I am able to open a popup window as well as able to display the data on it. whenever I am closing the second page, it is not updating the value to the first page.

 

Here is my code

 

 

Parent Window:

<apex:page controller="popupwindow">
<apex:form >
<apex:inputtext value="{!textval}"/>
<apex:commandLink value="get" onclick="popup('/apex/childwindow')"/><br/>
<script>
function popup(url)
{
newwindow=window.open(url,'name','width=400,height=400,top=0,toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,re sizable=yes,left=60,screenX=60,top=100,screenY=100');
if (window.focus){newwindow.focus()}
}
</script>

</apex:form>
</apex:page>

 

 

Child Window:

<apex:page controller="popupwindow" sidebar="false">
<apex:form >
<apex:dataTable value="{!accounts}" var="a" cellPadding="4" border="1">
<apex:column headervalue="Account Name">
<apex:commandLink onclick="close1()" action="{!filltextval}">
<apex:param name="name1" value="{!a.Name}"/>
{!a.Name}</apex:commandLink></apex:column>
</apex:dataTable>
<script>
function close1()
{
<!-- parent.window.opener.location.reload(); -->
parent.window.close();
}
</script>
</apex:form>
</apex:page>

 

Controller:

public class popupwindow
{
Public string textval{get;set;}

Public List<Account> getAccounts()
{
List<Account> acclist = [select name from account limit 10];
return acclist;
}

Public void filltextval()
{
textval = apexpages.currentpage().getparameters().get('name1');
}

}

 In the controller I am able to set the value to that particular textfield, but I am not able to display the data in the Parent VF Page. If I reload the parent page entire data is getting lost.

 

Any Suggestions on this will be highly appreciable................

 

 

Message Edited by hisrinu on 02-09-2009 03:57 AM