function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jbardetjbardet 

Change the Layout of "Edit All Products" ???

Disclaimer: Professional Edition User.

 

Under the opportunity, when clicking "Edit All Products" we have a bunch of fields and they all show up on one long horizontal line (with the save button awkwardly in the middle of the page).

 

Is it possible to edit the layout of this page so fields can show up vertically instead of horizontally?

 

Thanks for your help!

krishnagkrishnag

did you use the edit layout option and change the layout.

jeff @ yellowbricksystemsjeff @ yellowbricksystems

You can *almost* do this in Professional Edition, but you need Apex to get it to work, so you need to have Enterprise+.  You can create a Visualforce Page (which Professional allows) to have a custom layout, for example:

 

 

<apex:page standardController="Opportunity">
    <apex:form >
        <apex:pageBlock>
            <apex:pageBlockButtons>
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
            </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!Opportunity.OpportunityLineItems}" var="lineItem">
                <apex:column headerValue="Product">
                    <apex:outputField value="{!lineItem.PricebookEntry.Name}"/>
                </apex:column>
                <apex:column headerValue="Quantity">
                    <apex:inputField value="{!lineItem.Quantity}"/>
                </apex:column>
                <apex:column headerValue="Unit Price">
                    <apex:inputField value="{!lineItem.UnitPrice}"/>
                </apex:column>
                <apex:column headerValue="Date">
                    <apex:inputField value="{!lineItem.ServiceDate}"/>
                </apex:column>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

 

And then override the Edit All button with the page.  Unfortunately, Salesforce won't save the changes because it will only save the changes to the top level Opportunity object, not the child OpportunityLineItems that are actually changing. The page must use the standard 'Opportunity' controller to allow you to override the button and the OpportunityLineItem controller doesn't support List controllers anyway, so this is really the only option.  So, in order to do this you need to add an Extension to the page, which requires an Apex class.

jbardetjbardet

Thank you for such a great response.

 

After attending Dreamforce this year, I am building the case that we upgrade to enterprise. (I work for a smaller famiily business so in our case, the Admin (me) has a lot of influence over the decision!)

 

So we should be making the upgrade before the end of January!

 

I'll come back in here to repost at that time if I haven't figured it out based on your answer above.

 

Many thanks once again.