Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:pageBlockSection title="Product" >
- <apex:pageBlockSectionItem rendered="true">
- <apex:outputLabel value="{!$ObjectType.ZInstallation__c.fields.DiscountProfile__c.Label}" rendered="true" />
- <apex:selectList value="{!ZInstallation__c.DiscountProfile__c}" size="1" rendered="true" >
- <apex:selectOptions value="{!DiscountProfileList}" />
- </apex:selectList>
- </apex:pageBlockSectionItem>
- </apex:pageBlockSection>
- public List<SelectOption> getDiscountProfileList() {
- List<SelectOption> options = new List<Selectoption>();
- List<ZDiscountProfile__c> profileList = [SELECT Id, Name FROM ZDiscountProfile__c ORDER BY Name];
- options.add(new selectOption('', 'none'));
- for (ZDiscountProfile__c profile : profileList) {
- options.add(new selectOption(String.valueOf(profile.Id), profile.Name));
- }
- return options;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement