PrimoVE Item Locations Filter
We recently switched from Primo to PrimoVE and have had numerous complaints about activating the Filter Options for item locations in the Full Display view.
Here is the code I wrote to auto-enable the filter so that it will be on for users when they do a search. Here is a sample picture showing the filter on:
Here is the code:
/* Load JQuery */ /* JQuery required for this process */ var js = document.createElement('script') ; js.src = "//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"; document.head.appendChild(js); (function(){ "use strict"; "use strict"; var app = angular.module('viewCustom', ['angularLoad']); //Auto activates the filter for items in full display //written on 2/4/20 by Joe Ferguson from the University of Tennessee, Knoxville app.component('prmLocationItemsAfter', { bindings: {parentCtrl: '<'}, controller: function($scope){ var myVar = setInterval(activateFilter, 1000); function activateFilter() { if( $("span:contains('Filters')").length ){ clearInterval(myVar); return; } if( $("[id^='filter']").length ){ $("[id^='filter']").parent().click() } } } }); })();
8 Replies to “PrimoVE Item Locations Filter”
Leave a Reply
You must be logged in to post a comment.
This is great work. It is very easy to miss the filter icon in the display.
Is simply adding this to the js file enough? Do I need to configure anywhere else? Thanks in advance!
Just adding the code to the js file is not working for us, no.
I updated the code sample to show what the entire custom.js file would look like if you just had this customization. It requires the addition of jquery which I did not include in the previous code.
Thank you! It worked.
That’s really nice Joe, thanks for sharing
Hi Joe, although it did work as I mentioned, it interferes with other scripts in the .js file. I’ve placed it near the top of the file and also at the bottom, however it still affects the other scripts. Any advice?
Thanks in advance.
There is a related published Salesforce case: SF00593424