You need to sign in to do that
Don't have an account?
Glen.ax1034
Move Opportunity Product Description from Product2 Description
how do I make this cod work? it dies on the last SOQL statement.
trigger Load_Opportunity_Product_Details on OpportunityLineItem (before update) { List<PricebookEntry> pTypes = [SELECT Id, Product2Id FROM PricebookEntry]; //pull recordtype Id's and record type names from recordtypes where the sobject is contract MAP<Id , Id> maprtID_rtName = new MAP<Id , Id>(); //map record type ID's to record type names. for(PricebookEntry pTypeObj : pTypes) { mapptID_ptName.put(pTypeObj.id , pTypeObj.id); //for all recordtypes... log id's and record type names. } for (OpportunityLineItem opplineitem:Trigger.new){ opplineitem.description = [Select Description FROM Product2 where id = mapptID_ptName.get(opplineitem.PricebookEntryId)]; } }
Quick sloution is
If users are not allowed to edit "description" on opp prod screen, then just add a formula field on opp prod screen as "PricebookEntry.Product2.Description"
All Answers
Do you mean copy "Product2 description" to "Opportunity product Description" when new opportunity product added?
Quick sloution is
If users are not allowed to edit "description" on opp prod screen, then just add a formula field on opp prod screen as "PricebookEntry.Product2.Description"
http://boards.developerforce.com/t5/General-Development/Formula-fields-in-quot-Multi-Line-Layout-quot-for-Opp-Products/td-p/171558
I don't believe that is possible.
And yes. I meant copy "Product2 description" to "Opportunity product Description" when new opportunity product added.
I stand corrected