• Cory Mitchell
  • NEWBIE
  • 15 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies

Hey Dev Brains,

I've tried several things here and at a loss...

I'm looking to eliminate the blank spaces, what are your thoughts?

User-added image
Source code:
<apex:page standardController="Product2">
    <apex:form >
    <apex:pageBlock >
        <apex:pageBlockTable value="{!Product2.PricebookEntries}" var="entry">
            <apex:column headerValue="Promo Direct" styleClass="col">
                <apex:outputField rendered="{!entry.Pricebook2.Name == 'Promotional Direct'}"  value="{!entry.UnitPrice}"/>
            </apex:column>
            <apex:column headerValue="Wholesale" styleClass="col">
                <apex:outputField rendered="{!entry.Pricebook2.Name == 'Wholesale'}"  value="{!entry.UnitPrice}"/>
            </apex:column>
            <apex:column headerValue="Promo Distributor" styleClass="col">
                <apex:outputField rendered="{!entry.Pricebook2.Name == 'Promotional Distributor'}"  value="{!entry.UnitPrice}"/>
            </apex:column>
        </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:form>
</apex:page>

Does anyone have a way to create a field that would represent the value of each pricebook?

Example:
Product: Cup
Pricebook: Wholesale, Promotional Direct, Promotional Distributor

I would like them all to have their own field, if possible.

I create a Visualforce, but im not able to put that into a product view for easy access

I'm currently running this code to try and put my pricebook into my product layout page.

I need to run create three seperate vidual force pages for Wholesale, Promo Direct and Promo Distributor.

What am i missing?

<apex:page standardController="Product2" label="Wholesale Price">
    <apex:repeat value="{!Product2.PricebookEntries}" var="entry">
        <apex:outputField rendered="{!entry.Pricebook2.Name.Wholesale}" value="{!entry.UnitPrice}" />
    </apex:repeat>
</apex:page>

I'm getting an error at this line of code. (Underlined and italics)

Hey Dev Brains,

I've tried several things here and at a loss...

I'm looking to eliminate the blank spaces, what are your thoughts?

User-added image
Source code:
<apex:page standardController="Product2">
    <apex:form >
    <apex:pageBlock >
        <apex:pageBlockTable value="{!Product2.PricebookEntries}" var="entry">
            <apex:column headerValue="Promo Direct" styleClass="col">
                <apex:outputField rendered="{!entry.Pricebook2.Name == 'Promotional Direct'}"  value="{!entry.UnitPrice}"/>
            </apex:column>
            <apex:column headerValue="Wholesale" styleClass="col">
                <apex:outputField rendered="{!entry.Pricebook2.Name == 'Wholesale'}"  value="{!entry.UnitPrice}"/>
            </apex:column>
            <apex:column headerValue="Promo Distributor" styleClass="col">
                <apex:outputField rendered="{!entry.Pricebook2.Name == 'Promotional Distributor'}"  value="{!entry.UnitPrice}"/>
            </apex:column>
        </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:form>
</apex:page>

I'm currently running this code to try and put my pricebook into my product layout page.

I need to run create three seperate vidual force pages for Wholesale, Promo Direct and Promo Distributor.

What am i missing?

<apex:page standardController="Product2" label="Wholesale Price">
    <apex:repeat value="{!Product2.PricebookEntries}" var="entry">
        <apex:outputField rendered="{!entry.Pricebook2.Name.Wholesale}" value="{!entry.UnitPrice}" />
    </apex:repeat>
</apex:page>

I'm getting an error at this line of code. (Underlined and italics)