You need to sign in to do that
Don't have an account?
Devmen
Selectlist returning blank values
Hi,
Im using selectlist to get selected distributors from picklist. But its returning null values.
Thanks
Im using selectlist to get selected distributors from picklist. But its returning null values.
<div class="slds-grid slds-wrap" style="padding:20px;"> <div class="slds-col slds-size_4-of-12" style="padding:5px;"> <apex:outputLabel value="Distributor" styleClass="slds-output "/> </div> <div class="slds-col slds-size_6-of-12" style="padding:5px;"> <div class="slds-media__body" align="left"> <apex:selectList value="{!Selecteddistri}" id="r2" size="1" multiselect="false" styleClass="slds-input slds-size--1-of-1" style="width:100%;"> <apex:selectOptions Value="{!ListOfDistributors}"/> </apex:selectList> <script> </script> </div
public with sharing class DistributorOrderList_Ext { public String wrapOrder { get; set; } public Date fromdate1 {get;set;} public Date todate1 {get;set;} public String s{get;set;} public list<Order_C__c> OrdList {set;get;} public boolean orderflag{set;get;} public Order_C__c Ord1{set;get;} public String Selecteddistri {get;set;} public Account acc{set;get;} public Account acc1{set;get;} public list<wrapOrder> WrapList {get;set;} public List<wrapOrderSummary> WSumlist{get;set;} public boolean emailflag{set;get;} public map<string,list<Order_Line_Item_C__c>> mapWS{set;get;} public list<Order_Line_Item_C__c> ollist{set;get;} public map<string,wrapOrderSummary> mapWS1{set;get;} public integer Quant{set;get;} public decimal price{set;get;} public user u1{set;get;} public List<SelectOption> getListOfDistributors() { string AccountRecordTypename = Schema.SObjectType.Account.getRecordTypeInfosByName().get('Distributor').getname(); List<SelectOption> AccountOptionList = new List<SelectOption>(); AccountOptionList.add(new SelectOption('','--None--')); for(Account p : [select id,Name FROM Account where recordtype.name=:AccountRecordTypename ]) { AccountOptionList.add(new SelectOption(p.id, p.Name)); system.debug('P>ID'+p.id+'^^^^^P>NAME'+p.Name); } system.debug('AccountOptionList^^^^^^^0+'+AccountOptionList); return AccountOptionList; } public DistributorOrderList_Ext(){ Ord1=new Order_C__c(); OrdList=new List<Order_C__c>(); orderflag=false; WrapList=new list<wrapOrder>(); WSumlist=new list<wrapOrderSummary>(); mapWS=new map<string,list<Order_Line_Item_C__c>>(); mapWS1=new map<string,wrapOrderSummary>(); emailflag=false; system.debug('Selecteddistri********************'+Selecteddistri); ollist=new list<Order_Line_Item_C__c>(); //Account acct=[select id,Name from Account where id=:Selecteddistri]; //system.debug('Account222222'+acct); OrdList=[select id,name,Total_Quantity_in_Sets__c,Distributor__c,Route__c,Order_Amount__c,Order_Date__c,Distributor__r.Email__c,Retailer_O__r.name,Order_Type__c,(select id,name,Quantity__c,Remarks__c,MRP__c,Product__r.Item_Code__c,Product__r.Remarks__c,Product__r.Tube_Weight_gm__c,Product__r.Unit_In_Dozens__c,Product__r.name from Order_Line_Items__r) from Order_C__c where Order_Date__c>=:fromdate1 AND Order_Date__c<=:todate1 AND Distributor__c=:Selecteddistri AND Order_Type__c=:'Secondary Order']; system.debug('ORDDDDDDDDDDDLIST'+OrdList[0].Distributor__c); system.debug('DISTRIBUTORSS'+Selecteddistri); List<String> lstselectedRecordIds = new List<String>();In debug distributors getting blank.hene it retrieving all records instead of selected distributors.Where is the issue ?
Thanks