The product selection page is stuck in loading state when using product search plugin wile using translations.
Trailblazer Community

The product selection page is stuck in loading state when using product search plugin wile using translations.

Salesforce CPQ (Configure-Price-Quote)

Last updated 17 days ago ·Reference W-9035377 ·Reported By 1 users

In Review

Summary
When using product search plugin if a user with French as locale tries to search for a product with the translated name of the product, the product search page stays in infinite loading state.

Repro
STEPS TO REPRODUCE

1. Go to Apex classes and add a new class as follows

Code:

global with sharing class CPQProductSearchPlugin implements SBQQ.ProductSearchPlugin

{ global CPQProductSearchPlugin(){}



global Boolean isFilterHidden(SObject quote, String fieldName){ return false; }

global Boolean isInputHidden(SObject quote, String input){ return false; }

global Boolean isSearchCustom(SObject quote, Map<String,Object> fieldValuesMap){ return false; }

global Boolean isSuggestCustom(SObject quote, Map<String,Object> fieldValuesMap){ return false; }

global List<PricebookEntry> search(SObject quote, Map<String,Object> fieldValuesMap){ return null; }

global List<PricebookEntry> suggest(SObject quote, Map<String,Object> fieldValuesMap){ return null; }

global Object getFilterDefaultValue(SObject quote, String val){ return null; }

global Object getInputDefaultValue(SObject quote, String val){ return null; }

global String getAdditionalSuggestFilters(SObject quote, Map<String,Object> fieldValuesMap){ return null; }



global String getAdditionalSearchFilters(SObject quote, Map<String, Object> fieldValuesMap)

{ String additionalFilter = null;



additionalFilter ='Product2Id in (Select id from product2 where SBQQ__PricingMethodEditable__c =true)' ;



System.debug('additionalFilter ---> ' + additionalFilter);

return additionalFilter;

}

}



//Help doc: https://developer.salesforce.com/docs/atlas.en-us.cpq_dev_api.meta/cpq_dev_api/cpq_product_search_plugins.htm

2. Go to any product and click the Translate button and set the Product name to some value other than the original for French language. Let's say "testproduct".
3. Go to the configure page of the package and under Documents tab set "Enable Multi-Language Translations" to true. Mention the class name under Product Search Plugin field.
4. Go to advanced user details of the user profile you are logged in and set the Language to French and in the package settings populate the Product Search Plugin field with the apex class name('CPQProductSearchPlugin')
5. Now go into the QLE of any quote and click "Add Products" button and search with the text "testproduct".
6. Observe that the page is stuck in loading state and in the browser console you can see the error similar to the following:

line 422, column 1: The inner and outer selects should not be on the same object type Class.SBQQ.LocalizationDAO.loadBySearchFilters: line 422, column 1



7. This issue is present only when localization is involved.

Workaround
N/A

Reported By (1)

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.