Lesson Learned (Users aren't always dumb)

So in a typical IT type moment a user complained to me that in Sales Territory Maintenance that Sales Rep List wasn’t sorted properly. They wanted it sorted by Sales Rep Name.

I gasped exasperated, pontificated about the wonderful feature of Epicor which allows you to sort any grid and save that layout, went on about how we’ve had training on this, and hung up.

Got called back “it is still not sorting right”, rolled by eyes, told them to “prove it” and this is what I see…

what kind of other worldly magical sort is that…

Thanks Epicor for making me be a jerk… (more than normal) I eventually did figure out what the issue is, embedded drop-down in the grid shows name, but it sorts on Sales Rep Code… sigh

I’ll go apologize to my user now… grumble

image

5 Likes

You’re forgiven 80/20. Sort the data view by whatever you want :heartpulse:

private EpiDataView edvPartView;
 
public void InitializeCustomCode()
{
    this.edvPartView = ((EpiDataView)(this.oTrans.EpiDataViews["PartView"]));
    this.edvPartView.dataView.Sort = "PartNum ASC";
}
 
public void DestroyCustomCode()
{
    this.edvPartView = null;
}
4 Likes

Just guessing, but it is probably sorting by the salesperson ID, even though it is displaying the salesperson name… but I am just guessing.

I remember the User Account Security Tree in E9 used to do something funky like that. I’ve now stuck that tip in the toolbox @jgiese.wci Thanks.

1 Like

Correct @timshuwy that is what it was. There’s a dropdown in the grid so it looks like the name but its really the sales rep code.

Joshua Giese’s Solution saved my bacon today! Thanks!

@jgiese.wci
Any suggestions on applying this to Plant.CostID? We need to change the order of the plant selection list. I’m struggling to work out how that even loads… Ice.Plant perhaps?

Off the top of my head no sorry. What list are you looking at switching up? Screenshot me

1 Like

Hello @jgiese.wci thanks for your feedback here it is in Modern shell

Here it is in Kinetic
image
Sorry for the obfuscation. Essentially the list is the Descriptions /Names of the sites, but they are ordered in the Site ID order.

And yes if we had our time again site ids would have had some more though put into them prior to setting them up. It would be really useful for either Sites to have a sequence number or at a pinch use the site cost id. to order this list by.

Looks like after a bit of digging around it is Ice.BO.Plant.GetList

A simple .Sort on the results resolves this.

This method is called on login and the results must get loaded into memory for the client.

Attached an example 2022.1

PlantSort.bpm (22.3 KB)

Add

 result.PlantList.Sort("by Name");

To custom code in the Post processing bpm

Of course this hack does not replace making a thoughtful approach to configuring your system correctly in the first place. That being said it would be nice to have a sequence number for plants and be able to sort on that, rather than the Plant field.

1 Like

Nowhere in your story do you mention asking them why they want to sort that way in the first place.

Quite a long story. I think I’ll leave it at that.

Only-the-important-stuff-201x300.jpg.optimal

1 Like