• MMuneee
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 24
    Questions
  • 6
    Replies

i need to select both picklist and save them 

Visual force page
==============


<apex:page controller="ctlDepPickLst" tabStyle="Account">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockButtons >
             </apex:pageBlockButtons>
            <apex:pageBlockSection columns="2">
                <apex:pageblockSectionItem >
                    <apex:outputLabel value="Country"/>
                </apex:pageblockSectionItem>        
                <apex:pageblockSectionItem >                
                    <apex:selectList size="1" value="{!country}">
                        <apex:selectOptions value="{!countries}"/>
                        <apex:actionSupport event="onchange" reRender="a"/>
                    </apex:selectList>                
                </apex:pageblockSectionItem>
                <apex:pageblockSectionItem >
                    <apex:outputLabel value="State"/>
                </apex:pageblockSectionItem>            
                <apex:pageblockSectionItem >
                    <apex:selectList size="1" value="{!state}" id="a">
                        <apex:selectOptions value="{!states}"/>
                    </apex:selectList>
                </apex:pageblockSectionItem>            
            </apex:pageBlockSection>        
        </apex:pageBlock>
        <apex:pageBlock >                            
        </apex:pageBlock>
    </apex:form>
</apex:page>



Custom Controller
------------------------===






public class ctlDepPickLst {
    public String country {get;set;}
    public String state {get;set;}
    public PageReference Save()
    {
        return null;
    }
    

    public List<SelectOption> getCountries()
    {
        List<SelectOption> options = new List<SelectOption>();
        options.add(new SelectOption('None','--- Select ---'));        
        options.add(new SelectOption('US','United States'));
        options.add(new SelectOption('IN','India'));
        return options;
    } 
    
    public List<SelectOption> getStates()
    {
        List<SelectOption> options = new List<SelectOption>();
        if(country == 'US')
        {       
            options.add(new SelectOption('CO','Colorado'));
            options.add(new SelectOption('NE','Nevada'));
            options.add(new SelectOption('TE','Texas'));
        }
        else if(country == 'IN')
        {       
            options.add(new SelectOption('AP','Andrapradesh'));
            options.add(new SelectOption('TS','Telangana'));
            options.add(new SelectOption('TM','Tamilnadu'));
        }
        else
        {
            options.add(new SelectOption('None','--- Select ---'));
        }      
        return options;
    }       
}
I have a two picklist values.
1.Country  2.State
if i select the india then the  state picklist shoud have states belongs to india.Like that Us also

Can Any one help me.If possible provide the code

Thanks 
Hi guys i am having picklist with the values shipment and picked.
whenever shipment is selected one text box should be enabled and when ever we select the picked the text box should be disabled how is it possible ? is it possible through customization
I have A_info,B_info,C_info fields in user object. And i have a_luk,b_luk,c_luk fields in Custom object.

I want auto papulate the custom object fields with user object fileds.can any one help me


Thanks


Here am inserting 10000 records through data loader.After  inserting the 2000 records system is restarted.how we can insert the records from 2001.can any one help me 

Thanks....
 
I am trying to customize lead screen to set address information to each fields (states, city, street...) automatically by referring entered zip code to postal code field of the lead screen. And I am also trying to set zip code referring to entered address information?
 
I have the list of Japanese zip code-address information set to be loaded to custom objects or set at custom formula.
 
It is complementary mechanism for defective lead information.
 
We have tried by creating new Scontrol tab, but we would need to add the functionality on original salesforce.com lead tab.
 
Has anyone done similar one before? 
Anyone tell me some idea to realize the requirement?
 
I really appreciate your help in advance.
//update shipping address with billing address

trigger afterinsertbillingstreet on Account (After insert) {
    list<Account> li;
    for(Account a:trigger.new)
    {
        a.ShippingCity=a.BillingCity;
        a.ShippingCountry=a.BillingCountry;
        a.ShippingLatitude=a.BillingLatitude;
        a.ShippingLongitude=a.BillingLongitude;
        a.ShippingPostalCode=a.ShippingPostalCode;
        a.ShippingState=a.BillingState;
        a.ShippingStreet=a.ShippingStreet;
       // li.add(a);
    }
//update li;
}
here am getting error like"Error: Invalid Data.  Review all error messages below to correct your data. Apex trigger phupdate caused an unexpected exception, contact your administrator: phupdate: execution of AfterUpdate caused by: System.QueryException: List has no rows for assignment to SObject: Trigger.phupdate

trigger phupdate on Contact (after insert,after update) {
List<account> li=new list<Account>();
for(Contact c: trigger.new)
{
Account a=[select Phone from account where id=:c.Accountid ];
a.Phone= c.MobilePhone;
li.add(a);
}
update li;
}
We have positions for a developer and senior developer to join our team in Pune India. The candidate must have experience of more than a year in Salesforce. We need him to start immediately in Pune
  • November 28, 2014
  • Like
  • 0
I have A_info,B_info,C_info fields in user object. And i have a_luk,b_luk,c_luk fields in Custom object.

I want auto papulate the custom object fields with user object fileds.can any one help me


Thanks
 
I am trying to customize lead screen to set address information to each fields (states, city, street...) automatically by referring entered zip code to postal code field of the lead screen. And I am also trying to set zip code referring to entered address information?
 
I have the list of Japanese zip code-address information set to be loaded to custom objects or set at custom formula.
 
It is complementary mechanism for defective lead information.
 
We have tried by creating new Scontrol tab, but we would need to add the functionality on original salesforce.com lead tab.
 
Has anyone done similar one before? 
Anyone tell me some idea to realize the requirement?
 
I really appreciate your help in advance.