• sunaya
  • NEWBIE
  • 0 Points
  • Member since 2013

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

I am trying to Disable Triggers using Change Sets. It is resulting in these errors which is coming from the Test Class

 

 Failure Message: "System.DmlException: Insert failed. First exception on
row 0; first error: STANDARD_PRICE_NOT_DEFINED, No standard price
defined for this product: []", Failure Stack Trace:
"Class.ActivateQuote.updateForecast: line 222, column 1
Class.AddKittTest.AddKittTestMethod: line 79, column 1"

 

 

How can I resolve this? How can I disable the Test Class too.

While adding the Quote Line items to the Quote, a Sales User some times wants to add a product that is not available on the Product2 table.

 

The Product2 Table does not have all the products all the time, that a Sales User needs to  build a Quote.

 

Has anyone designed a functionality around this requirement, that will allow Sales People to add products to the Quote , if they cannot find it under the Product2 table or while searching through Quote LIne items.

 

 

thanks

 

On the existing VF Page, there are commanlinks used to select products.

IT looks like this:-

 

The   VF page called - Custom Product Selector allows users to add products to the   list using commandlink - Add Link.    <apex:commandlink value="Add"   action="{!ProcessSelected}" rerender="Selected"   style="color:blue">
                                <apex:param name="contIdParam" value="{!p.ID}"   assignTo="{!PBEIdChosen}"/>
                            </apex:commandlink>
  

 

We need CHECKBOXES instead of links, to be able to select several products   at once to the list. 

 

 

Sales User feels it is   a burden to have to enter each product  inidividually then wait for it to   add to the list.

 

Can we provide checkboxes selection instead of links in the Visual force page.?

 

This VF page is trying to mimic the search product page - the standard page to search and add products from the opportunity. The checkboxes on that page, is what we would like to see here in this VF page.

 

 

Is this possible?

This was developed by one of the freelance developer, and I am trying to understand how to enhance the search results. Any ideas or tips would be appreciated?

 

Here is the situation:-

 

We have 30,000 product line items in the Product2 table. If we search for any part number (custom field in product2 table) the search results efficient are accurate.

If the same table is searched via a VisualForce page which is being called in the APEX Class, the search is SUPER DUPER Slow.

 

The APEX Class is as follows:-

Please advice, what is the better way to write this APEX Class, so the search results can be made faster:-

 

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 global class AddProductLines {
      webservice static String doNothing(String QuoteHeaderID) {
          String ProductQuoteID;
          List<Quote> ProductQuoteHeader = [SELECT ID FROM Quote WHERE QuoteCommonHeader__c =: QuoteHeaderID LIMIT 1];
          For(Quote q : ProductQuoteHeader){
              ProductQuoteID = q.ID;
          }
          string CurrURL = URL.getCurrentRequestUrl().toExternalForm();
        system.debug('CurrentURL :' + CurrURL);
        String[] CurrURLsplit = CurrURL.Split('/');
        String LongServer = CurrURLsplit[2];
          system.debug('LongServer :' + LongServer);
        string LongServerReplace = LongServer.Replace('.','/');
        String[] LongServerSplit = LongServerReplace.Split('/');
        string server = LongServerSplit[0];      
         //https://cs13.salesforce.com/_ui/sales/quote/SelectSearch?addTo=0Q0W00000004GQJ&retURL=%2F0Q0W00000004GQJ
          string urlPreamble = 'https://c.' + server + '.visual.force.com/apex/CustomProductSelector?';
          string urlMidSection = '&retURL=%2F';
          string NewURL =  urlPreamble + 'MQ=' + QuoteHeaderID + '&PQ=' + ProductQuoteID ; // + ProductQuoteID + urlMidsection + QuoteHeaderID; //ProductQuoteID;
         
          PageReference ProductAddPage = new PageReference(NewURL);
          ProductAddPage.setRedirect(true);
        //    return 'NewURL';
      
      Return NewURL;
       }
}

 

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

 

Here is the VF page. It is very long, so I will just paste the heading of it.

 

 

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

<apex:page StandardController="PricebookEntry" Extensions="ProductSelectorExtension" standardStylesheets="True" id="MainPage" sidebar="false">

 

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

 

 

Thanks

sumita

 

 

 

 

When a Quote is created from an Opporutnity , all the product line items gets copied over, including some standard fields like

 

Line Item Description

Quantity

Sales Price.

 

There is a COST field on OpportunityProduct, which also needs to get copied over to the Quote LIne Items.

 

I cannot do this using Formulas or WF Rule.

 

I think, Trigger can be done here.

 

Can some one please confirm this and guide me to right direction. ?

 

 

Thanks

sumita

 

 

 

Hi,

 

If you are looking for  resources to work remotely as Developer,Administrator for Implementation ,support or enhancement work 

then do contact us at salesforcemadeeasy@gmail.com.

 

We are salesforce.com services and training offering company who knows in and out about salesforce.

We are salesforce certified consultant,Advanced Admin,Advanced Developer professionals .We have got real time experience on Salesforce architecture.

Experts in Salesforce.com Customization ,configuration and integration. 

 

Thanks,