Posts

Showing posts from February, 2015

Write The Dynamic Query in Salesforce and bind in page block table with filter conditions

Class Code public class ClassName {     public product2 objProduct {get;set;}     public string StrCourseName {get;set;}     public string UserName {get;set;}     public id AccountId {get;set;}     public List<PricebookEntry> lstpbe ;     public List<WrapProductSelect> lstWrapProductSelect{get;set;}     public list<opportunity> lstOpportunityToInsert {get;set;}     public list<Offer_Item__c> lstofofferItem{get;set;}     public list<OpportunityLineItem> lstofOppLI;     public boolean isSelectedProduct;     public list<product2> lstProductSearched {get;set;}     public integer totalPageNumber{get;set;}     public integer intNumRecord{get;set;}     public Integer pageNumber{get;set;}     public Integer pageSize{get;set;}     public Integer intTotalCount{get;set;}     public boolean SelectAll{get;set;}     public list<WrapProductSelect> lstWrapperSelected{get;set;}     public boolean isShowPanel{get;set

Show List of Subordinate User In Apex: In Role hierarchy

Requirement: To Update the Lead Owner field with his sub-ordinate users Solution : Create a custom Button on Lead Detail Page and Call a visualforce page  Page  Code: <apex:page standardController="Lead" extensions="AssigneLeadController" sidebar="false"> <apex:form id="frmid">   <apex:pageMessages id="msgid"></apex:pageMessages>     <apex:pageBlock rendered="{!showPanel}">        <apex:pageBlockSection >         <apex:pageBlockSectionItem >              Sub-Ordinate User:              <apex:selectList multiselect="false" size="1" value="{!UserId}" id="UserVal">                       <apex:selectOptions value="{!options}"/>              </apex:selectList>         </apex:pageBlockSectionItem>                  <apex:pageBlockSectionItem >              Self Assign:              <ap