How-to Guide
Nue Platform
Price Tag Search Plugin
1 min
this plugin can be used to flexibly apply price tags, to certain users, accounts or quotes so there may be a need to hide price tags or discount tags without deactivating them ability to filter by users occasionally, users may wish to hide price tags and discount tags from sales reps when working on a quote line item or order product in the line editor, without the need to deactivate these tags for example, users with different profiles might need to use varied sets of price tags for different products to offer this level of flexibility, we offer an interface plugin for admin users to modify the outcomes of the price tag search within the line editor the user can follow the steps below to implement an price tag search plugin to create a price tag search filterusing salesforce apex code step 1 implement the price tag search plugin create an apex class that implements the following interface ruby custompluginmanager pricetagsearchplugin note note the apex class must be declared as ‘ global ’ since the interface is a global interface please see an example below // example if the user profile is ‘account executive’, hide all tags with ‘deal desk only’ in the name global class custompricetagsearchplugin implements custompluginmanager pricetagsearchplugin { global custompricetagsearchplugin() {} global string getadditionalsearchfilters() { system debug('tina calling getadditionalsearchfilters'); string userprofile = \[select profile name from user where id = \ userinfo getuserid()] profile name; if (userprofile == 'account executive') { return 'and (not name like \\'deal desk only%\\')'; } return ''; } } step 2 register the plugin login to your salesforce org and navigate to setup search for ‘custom setting’ and navigate to the custom settings list page click on the ‘manage’ link on ‘nue system setting’ search for 'pricetagsearchplugin’ and click ‘edit’ if there is no entry found, create a new record with the following information name pricetagsearchplugin category custom plugin description price tag search plugin label price tag search plugin in the value field, enter your apex class name, e g , custompricetagsearchplugin, and click 'save' step 3 test the plugin the plugin is now ready for testing to proceed, log in using the designated testing user account, access a quote, go to the line editor, and select the 'price tag' icon within a quote line confirm that only the price tags available with the additional search filters are visible ability to filter by quote id & order id users may wish to filter out or hide certain price tags and discounts tags based on say state of the account associated with the quote, without deactivating these tags with this enhancement to the price tag search plugin, dynamic filtering based on the associated quote or order is supported, improving flexibility for custom pricing scenarios this essentially enables searching & filtering through price tags based on a specific quote or order context step 1 implement the price tag search plugin create an apex class that implements the following interface ruby custompluginmanager pricetagsearchplugin note the apex class must be declared as ‘global’ since the interface is a global interface please see the example below global class pricetagsearchtestplugin implements ruby custompluginmanager pricetagsearchplugin { 	global pricetagsearchtestplugin() {} global string getadditionalsearchfilters() { system debug('ruby pricetagsearchtestplugin calling getadditionalsearchfilters'); try { // get current record id (should be a quote) id currentobjectid = ruby custompluginmanager getobjectid(); system debug('pricetagsearchtestplugin\ current quote id ' + currentobjectid); // always query quote //quote quote = \[ // select id, accountid // from quote // where id = \ currentobjectid // limit 1 // ]; order order = \[ select id, accountid from order where id = \ currentobjectid limit 1 ]; system debug('pricetagsearchtestplugin\ related accountid ' + order accountid); } catch (exception e) { system debug('ruby pricetagsearchtestplugin exception ' + e getmessage()); } string rubycodefilter = 'and name like \\'%discount%\\''; return rubycodefilter; } } step 2 register the plugin login to your salesforce org and navigate to setup search for ‘custom setting’ and navigate to the custom settings list page click on the ‘manage’ link on ‘nue system setting’ search for 'pricetagsearchplugin’ and click ‘edit’ if there is no entry found, create a new record with the following information name pricetagsearchplugin category custom plugin description price tag search plugin label price tag search plugin in the value field, enter your apex class name, e g , custompricetagsearchplugin, and click 'save' step 3 test the plugin the plugin is now ready for testing to proceed, log in using the designated testing user account, access a quote, go to the line editor, and select the 'price tag' icon within a quote line confirm that only the price tags available with the additional search filters are visible
🤔
Have a question?
Get answers fast with Nue’s intelligent AI, expert support team, and a growing community of users - all here to help you succeed.
To ask a question or participate in discussions, you'll need to authenticate first.