Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <apex:pageBlockSection title="Product" >
  2. <apex:pageBlockSectionItem rendered="true">
  3. <apex:outputLabel value="{!$ObjectType.ZInstallation__c.fields.DiscountProfile__c.Label}" rendered="true" />
  4. <apex:selectList value="{!ZInstallation__c.DiscountProfile__c}" size="1" rendered="true" >
  5. <apex:selectOptions value="{!DiscountProfileList}" />
  6. </apex:selectList>
  7. </apex:pageBlockSectionItem>
  8. </apex:pageBlockSection>
  9.  
  10. public List<SelectOption> getDiscountProfileList() {
  11. List<SelectOption> options = new List<Selectoption>();
  12. List<ZDiscountProfile__c> profileList = [SELECT Id, Name FROM ZDiscountProfile__c ORDER BY Name];
  13.  
  14. options.add(new selectOption('', 'none'));
  15.  
  16. for (ZDiscountProfile__c profile : profileList) {
  17. options.add(new selectOption(String.valueOf(profile.Id), profile.Name));
  18. }
  19.  
  20. return options;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement