• SFDC Beginner745
  • NEWBIE
  • 20 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies

public Pricebook2 theBook {get;set;}
public List<Authorized_Product__c> authorizedProductObjList =[SELECT Active__c,Distribution_Type__c,Id,Name,Product_Category__c,Product_Collection__c,Price_Book__c,
                                    Product_Family__c,Reseller__c,Standard_Discount__c,Demo_Unit_Discount__c ,Parts_Discount__c,Material_Discount__c
                                    FROM Authorized_Product__c WHERE Reseller__c = :theOpp.RapidForm_Reseller__c AND Active__c = true];
for(Authorized_Product__c authp : authorizedProductObjList){
                
                if(PPP && authp.Product_Family__c.contains('Printers') && authp.Price_Book__c!=null){
                    theBook = [select Id, Name from Pricebook2 where ID = :authp.Price_book__c];
                    forcePricebookSelection=false;
                }
            }
        }
Hi, I am not a developer. I need to write trigger on opportunity object,  opp name should be auto populate accountname:oppname entered by user.
requirement is
company has decided to have the Opportunity naming convention as “<Account Name>: <Opportunity Name>”. For example, if the opportunity is pertaining to 200 laptops, from Account ABC, the Opportunity naming convention should be “ABC: 200 laptops”. However, do not mandate this to be filled in as such by users. Instead, automatically update the Opportunity name as <Account Name>: <Opportunity Name> if someone creates the Opportunity without Account Name already in it.