#TRAILHEADATHONWEEK @newdelhisfdcdug
Congratulations to all the winners who made it to Top 5!!— Atul Gupta (@atul31gupta) September 19, 2016
Prizes will be announced soon!!#TrailheadathonWeek pic.twitter.com/WLnjonJbXU
Congratulations to all the winners who made it to Top 5!!— Atul Gupta (@atul31gupta) September 19, 2016
Prizes will be announced soon!!#TrailheadathonWeek pic.twitter.com/WLnjonJbXU
XperienceProgressBarForSalesforceClassic
Version 1.3
Use this URL to install the package into any organization:
https://login.salesforce.com/packaging/installPackage.apexp?p0=04t90000000NOPH
Note: If you are installing into a sandbox organization you must replace the initial portion of the URL withhttp://test.salesforce.com
User Permissions Needed | |
---|---|
To add or remove activation records for session-based permission sets: | “Manage Session Permission Set Activation” |
To use the Salesforce API: | “API Enabled” |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | public with sharing class ProgressBarVisualforce_cls { //Attributes for parsing picklist values public List<String> pickListVals {get; set;} //list to hold picklist values on a given record type public String valsText {get; set;} public Boolean loadOnce {get; set;} private Opportunity opp; //attributes for segregating picklist values public String sCurrentStageValue {get; set;} public list<String> listCompletedStages {get; set;} public list<String> listNotCompletedStages {get; set;} public map<Integer, String> mapStageNr2StageValue ; public map<String, Integer> mapStageValue2StageNr ; public Integer sCurrentStageNr ; public ProgressBarVisualforce_cls(ApexPages.StandardController std){ sCurrentStageValue = '' ; sCurrentStageNr = 0 ; mapStageNr2StageValue = new map<Integer, String>() ; mapStageValue2StageNr = new map<String, Integer>() ; listCompletedStages = new list<String>() ; listNotCompletedStages = new list<String>() ; String sOpportunityId = ApexPages.currentPage().getParameters().get('Id') ; system.debug('Sudhir sOpportunityId:: ' + sOpportunityId) ; Opportunity oOpportunity = [SELECT Id, Name, toLabel(StageName) FROM Opportunity where Id =: sOpportunityId] ; //toLabel is used because Translation Workbench is enabled in my org. sCurrentStageValue = oOpportunity.StageName ; system.debug('opp.StageName:: ' + opp.StageName) ; loadOnce=true; //reload(); } public void reload(){ pickListVals=new List<String>(); Boolean skip=true; for (String val : valsText.split(':')){ if (skip){ skip=false; }else { pickListVals.add(val); } } loadOnce=false; // for(Integer i = 0; i < pickListVals.size(); i++){ mapStageNr2StageValue.put(i+1, pickListVals[i]) ; mapStageValue2StageNr.put(pickListVals[i], i+1) ; } system.debug('Sudhir mapStageNr2StageValue:: ' + mapStageNr2StageValue) ; system.debug('Sudhir mapStageValue2StageNr:: ' + mapStageValue2StageNr) ; if(mapStageValue2StageNr.containsKey(sCurrentStageValue)){ sCurrentStageNr = mapStageValue2StageNr.get(sCurrentStageValue) ; system.debug('Sudhir sCurrentStageNr:: ' + sCurrentStageNr) ; for(Integer i : mapStageNr2StageValue.keySet()){ if(i < sCurrentStageNr){ listCompletedStages.add(mapStageNr2StageValue.get(i)) ; } else if(i > sCurrentStageNr){ listNotCompletedStages.add(mapStageNr2StageValue.get(i)) ; } } system.debug('Sudhir listCompletedStages:: ' + listCompletedStages) ; system.debug('Sudhir listNotCompletedStages:: ' + listNotCompletedStages) ; } } } |