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
carbettycarbetty 

Product Family to Opportunity Product Trigger

I need to to have the Product Family picklist display on the opportunity product line item.  I can't do this in a formula because I need the picklist to be available for other formulas and roll-up summary calculations.

 

Is this trigger difficult to build?  I can get someone to build it for me but I need a good estimate on how long it should take

 

Thanks in advance.

mR_nGmR_nG

you can create a new add product page replace the standard one
<apex:page standardController="Opportunity"  extensions="NewProductExt"  >

<apex:sectionHeader title="Add Opportunity Product" subtitle="" ></apex:sectionHeader>

<apex:pageBlock >

<apex:facet name="header" >

    <apex:form >

        <apex:panelGrid styleClass="list" columnClasses="pbTitle,pbButton,pbHelp" columns="3" border="0" cellpadding="0" cellspacing="0" >

            <apex:outputLabel ><h3>Product Details</h3></apex:outputLabel>
            

        </apex:panelGrid>
         
    </apex:form>


</apex:facet>
 
<apex:form >

             <apex:pageMessages />
            <apex:panelGrid columns="7" width="100%" cellpadding="0" cellspacing="0" columnClasses="left,left"   id="CustAcNoPanel">



                    <apex:outputText value="Service Category :" style="text-align:right;font-weight:bold"/>

                    <apex:outputText value="Service Required :" style="text-align:right;font-weight:bold"/>
                    
                    <apex:outputText value="Service Duration:" style="text-align:right;font-weight:bold"/>
                    
                    <apex:outputText value="Payment Terms:" style="text-align:right;font-weight:bold"/>
                                        
                    <apex:outputText value="Quantity:" style="text-align:right;font-weight:bold"/>                  
                    
                    <apex:outputText value="Standard Discount:" style="text-align:right;font-weight:bold"/>                  
                    
                    <apex:outputText value="" style="text-align:right;font-weight:bold"/>                   
                                        

                    <apex:panelGroup >
                        <apex:selectList value="{!OppProdCategory}" size="1" id="OppProdCatID"  >
                            <apex:selectOptions value="{!OppProdCategories}" id="OppProdCatList"/>
                            <apex:actionSupport event="onchange" rerender="OppProdTypeID,OppProdDescID,OppProdDiscountID" status="CategoryRendStatus"/>                                              
                        </apex:selectList>
                        <apex:actionStatus id="CategoryRendStatus" startText="(Rendering...)" />
                    </apex:panelGroup>                


                    <apex:panelGroup >
                        <apex:selectList value="{!OppProdService}" size="1" id="OppProdTypeID"  >
                            <apex:selectOptions value="{!OppProdServices}" id="OppProdTypeList"/>
                            <apex:actionSupport event="onchange" rerender="OppProdDescID,OppProdDiscountID" status="ServiceRendStatus"/>                                              
                        </apex:selectList>
                        <apex:actionStatus id="ServiceRendStatus" startText="(Rendering...)" />
                    </apex:panelGroup>                
        
                
                    <apex:panelGroup >
                        <apex:selectList value="{!OppProdServDur}" size="1" id="OppProdDescID"  >
                            <apex:selectOptions value="{!OppProdServDurs}" id="OppProdDescList"/>
                            <apex:actionSupport event="onchange" rerender="OppProdPayTermID,OppProdDiscountID" status="DurationRendStatus"/>                                                                          
                        </apex:selectList>
                        <apex:actionStatus id="DurationRendStatus" startText="(Rendering...)" />                        
                    </apex:panelGroup>                

                    <apex:panelGroup >
                        <apex:selectList value="{!OppProdPayTerm}" size="1" id="OppProdPayTermID"  >
                            <apex:selectOptions value="{!OppProdPayTerms}" id="OppProdPayTermList"/>
                            <apex:actionSupport event="onchange" rerender="OppProdDiscountID,OppProdQTYID" status="PayTermRendStatus"/>                                                                                                      
                        </apex:selectList>
                        <apex:actionStatus id="PayTermRendStatus" startText="(Rendering...)" />                                                
                    </apex:panelGroup>                

                    <apex:panelGroup >
                        <apex:InputText size="3" value="{!OppLineQty}" id="OppProdQTYID" >
                            <apex:actionSupport event="onchange" rerender="OppProdDiscountID" status="QTYRendStatus"/>                                                                                                      
                        </apex:InputText>
                        <apex:actionStatus id="QTYRendStatus" startText="(Rendering...)" />                                                
                    </apex:panelGroup>          
                    
                    <apex:panelGroup >
                        <apex:selectList value="{!OppDiscountType}" size="1" id="OppProdDiscountID"  >
                            <apex:selectOptions value="{!OppDiscountTypes}" id="OppProdDiscountList"/>
                        </apex:selectList>
                    </apex:panelGroup>                


                 
            </apex:panelGrid>

            <br/> 
            <br/><br/><br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 



            
             <apex:commandButton value="Add to Opportunity" action="{!AddToOpp}"/> 
             <apex:commandButton value="Cancel" action="{!Cancel}"/> 
             
             
</apex:form> 
    



</apex:pageBlock>

</apex:page>
carbettycarbetty

Thank you so much for the info!  I consulted with a developer who has already put in a trigger that does exactly what I need.  Your help is greatly appreciated though.