• Balakumar Ramachandran
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi all,

I am struck where i am not able to show my dependent picklist values using apex. Can anyone suggest how to proceed further ?

the reason i am running  behind apex is VF Page does not allow to show more than 10 dependent standard picklist values even though all these fields are stored in API...

controller
-------------
 public List<SelectOption> getSalesBu()
    {
      List<SelectOption> options = new List<SelectOption>();
      options.add(new SelectOption('--None--','--None--'));
 
      Schema.DescribeFieldResult SBU = Opportunity.Sales_BU2__c.getDescribe();
      List<Schema.PicklistEntry> ple = SBU.getPicklistValues();
        for( Schema.PicklistEntry f : ple)
            {
                options.add(new SelectOption(f.getLabel(), f.getValue()));
            }
       return options;

    }
    

     public List<SelectOption> getProductTypeSalesBu()
    {
      List<SelectOption> options = new List<SelectOption>();
      system.debug('------------SelectedValue-------------'+selectedSalesBu); 
      if(selectedSalesBu != NULL)
      { 
            options.add(new SelectOption('--None--','--None--'));

      for (Opportunity proSales : [select Id,Name,Product_Type_Sales_BU__c from Opportunity Where Sales_BU2__c = :selectedSalesBu])
            {
            
                    options.add(new SelectOption(proSales.id,proSales.name));
             }
       

       }return options;
    } 

i need to show Product_Type_Sales_BU__c  values based on selected Sales BU Selection. I am seeing selected SalesBU Value passed to Query but how to show Product_Type_Sales_BU__c  values..

if i change from

                    options.add(new SelectOption(proSales.id,proSales.name));

to 
                    options.add(new SelectOption(proSales.id,proSales.Product_Type_Sales_BU__c));

i get an error..
Hi all,

I have a bootstrap page with Jquery validation.

I have 2 panels and when the 2 panels are kept opened the jquery validation is working and my custom error messages are shown where as when i collapse the 2 panels and submit the form, validation does not seem to occur instead the salesforce default error message pop'sup in the respective fields.

can anyone suggest. 
Hi all,

I am struck where i am not able to show my dependent picklist values using apex. Can anyone suggest how to proceed further ?

the reason i am running  behind apex is VF Page does not allow to show more than 10 dependent standard picklist values even though all these fields are stored in API...

controller
-------------
 public List<SelectOption> getSalesBu()
    {
      List<SelectOption> options = new List<SelectOption>();
      options.add(new SelectOption('--None--','--None--'));
 
      Schema.DescribeFieldResult SBU = Opportunity.Sales_BU2__c.getDescribe();
      List<Schema.PicklistEntry> ple = SBU.getPicklistValues();
        for( Schema.PicklistEntry f : ple)
            {
                options.add(new SelectOption(f.getLabel(), f.getValue()));
            }
       return options;

    }
    

     public List<SelectOption> getProductTypeSalesBu()
    {
      List<SelectOption> options = new List<SelectOption>();
      system.debug('------------SelectedValue-------------'+selectedSalesBu); 
      if(selectedSalesBu != NULL)
      { 
            options.add(new SelectOption('--None--','--None--'));

      for (Opportunity proSales : [select Id,Name,Product_Type_Sales_BU__c from Opportunity Where Sales_BU2__c = :selectedSalesBu])
            {
            
                    options.add(new SelectOption(proSales.id,proSales.name));
             }
       

       }return options;
    } 

i need to show Product_Type_Sales_BU__c  values based on selected Sales BU Selection. I am seeing selected SalesBU Value passed to Query but how to show Product_Type_Sales_BU__c  values..

if i change from

                    options.add(new SelectOption(proSales.id,proSales.name));

to 
                    options.add(new SelectOption(proSales.id,proSales.Product_Type_Sales_BU__c));

i get an error..
Hi all,

I have a bootstrap page with Jquery validation.

I have 2 panels and when the 2 panels are kept opened the jquery validation is working and my custom error messages are shown where as when i collapse the 2 panels and submit the form, validation does not seem to occur instead the salesforce default error message pop'sup in the respective fields.

can anyone suggest.