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
EtauEtau 

Overriding Multi-line layout for Opp Products

I have created a visual force page to replace the standard page for adding opportunity line items.  I have tried talking to the SF help line, but I can't understand them due to bad phone connections and a language barrier.  WHen I go the buttons and links and try to override the add product button, this page doesn't show up as an option.  Any idea what I am doing wrong?  Here is the code:  Thanks

 

<apex:page standardController="OpportunityLineItem">
 <apex:form >
 <apex:pageBlock title="Opportunity Add Products">
 <Apex:pageBlockButtons >
 <Apex:commandButton value="Save" action="{!save}"/>
 <Apex:commandButton value="Cancel" action="{!cancel}"/>
</Apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:outputField value="{!OpportunityLineItem.PricebookEntry.Name}"/>
<apex:outputField value="{!OpportunityLineItem.UnitPrice}"/>
<apex:outputField value="{!OpportunityLineItem.French_Title_Lookup__c}"/>
<apex:outputField value="{!OpportunityLineItem.Start_Date__c}"/>
<apex:outputField value="{!OpportunityLineItem.Show_Location__c}"/>
<apex:outputField value="{!OpportunityLineItem.End_Date__c}"/>
<apex:outputField value="{!OpportunityLineItem.Quantity}"/>
<apex:outputField value="{!OpportunityLineItem.DVD_Quantity__c}"/>
<apex:outputField value="{!OpportunityLineItem.Screening_Date__c}"/>
<apex:outputField value="{!OpportunityLineItem.DVD_Amount__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="DVD Shipping Information">
<apex:outputField value="{!OpportunityLineItem.Sent_DVD_s__c}"/>
<apex:outputField value="{!OpportunityLineItem.DVD_Returned__c}"/>
<apex:outputField value="{!OpportunityLineItem.DVD_Sent_Date__c}"/>
<apex:outputField value="{!OpportunityLineItem.DVD_Return_Date__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
 </apex:page>

Ritesh AswaneyRitesh Aswaney

Hey,

My initial thoughts were that maybe you need to implement the OpportunityLineItem Standard Controller with an Extension, which is associated with the override page.

 

This post on the forums seems to concur with my line of thinking - worth a shot.

 

http://forums.sforce.com/t5/Visualforce-Development/Replace-the-product-selection-page/td-p/82796

Look at the post by michaelforce on there.

 

Good luck !

forecast_is_cloudyforecast_is_cloudy

You need to set the standard controller to 'Opportunity' and not 'OpportunityLineItem' in order to use that page to override the standard 'Add Product' functionality.

yvk431yvk431

Yeah forecast is right you need to use 'Opportunity' as standard controller,

 

but there are few other things to be taken care of if you want to go with overriding the Add Product button.

 

Once you ovverride, you need to handle the Productbook selection as well as the Products Search functionalities.

 

Let me know if you need more info.

Ankit AroraAnkit Arora

You can also refer Inbuilt Business Logics For Opportunity/Quote

Hope this may help you.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

EtauEtau

Thanks to all of you for your advice.  I'll give it a whirl and let you know.  I appreciate the help.