Inactivate Ship To Address

On the GetLIst method that looks up the ShipTo addressess you need to update the where clause to include your UD field = 0. It can get hairy because you have to account for Epicor sending no where clause, having part of a where clause or what have you. Generally I will do

pseudo mess to follow

if whereclause blank then
    whereclause  = my custom where clause to filter inactive
else
   whereclause = my custom where clause + " AND " + whereclause
6 Likes

Also fair warning getting that where clause correct will take some tracing and trial and error occasionally to make sure you are injecting your custom clause without messing up the original where too much. sometimes they throw in an Order By or the like.

1 Like

I am a rookie and am concerned that I do not have enough skills to accomplish this task, but I will keep trying and test various solutions.
I have attached the trace.TraceData 2022-1-28 test 2.txt (104.0 KB)

So i believe you will need to look up the ShipTo BO and in PreProcessing of GetList update the argument whereclause with my logic of set whereclause = "CheckBox01 = 0 AND " + whereclause

Might be a good idea limit the BPM to running when it’s called from order entry. That way your inactive shiptos still show up in customer maintenance and stuff

1 Like

This is a good thread that go’s over the where clause if you haven’t worked with it before.

For what it is worth, I’ll share those Epicor ERP Ideas, ERP-I-56, ERP-I-1495.

Ability to make Ship Via, Part Class and Customer inactive is coming in 2021.2.

1 Like

One old method is simple addition of a prefix to the names/descriptions of inactive items. In may case, I add “Z-” to anything that shouldn’t be used but… does not have a native method for inactivating.
image

Hello Joshua,
If I were to try to create the search as a BAQ then this would be the code that I would use:
select ShipTo.CustNum as ShipTo_CustNum
ShipTo.ShipToNum as ShipTo_ShipToNum
from Erp.ShipTo as ShipTo
inner join Erp.OrderHed as OrderHed on
OrderHed.CustNum = ShipTo.CustNum
and ShipTo.CheckBox01 = FALSE

I have been trying to read about a whereclause and this is my attempt:


Check syntax and validate are both successful. But when I run the BPM by hitting the ShipTo search button in Order Entry, I get a server error. I have attached the error message.ServerError message.txt (5.4 KB)
Notes: We are a multi-tenant customer. Also, I have read and re-read the post about ShipVia How to Inactivate. There is a post that shows an Execute Custom Code button, but I do not have this button available in my BPM workflow screen.

I appreciate all the advice you have given but I am having troubles executing the tasks.
Heide

That where clause is SQL not c# the code in quotes would need to be SQL syntax.
You would want something like

(string.IsNullOrEmpty(whereClause)) ? "ShipTo.CheckBox01 = 0" : $"ShipTo.CheckBox01 = 0 AND ({whereClause})"

The above checks if whereClause is empty if so it just uses your inactive statement if not then it does that and adds the original where clause back in. You do not need to link orderhed to ship to in the where that’s all done in the background for you. Only add your custom condition of checkbox01 = 0

2 Likes

Cloud customers now have the ability to inactivate ShipVia, Part Class and Customers.
Now if they could do the same for suppliers, product group, etc…
Note - you need to launch in Kinetic to see the field.
image

3 Likes

Cloud Customers can also do a personalization on the classic screens grid view buy unhiding the new “Inactive” field. And the classic screens such as Order Entry when selecting ship via will remove the inactive entry from the list.

1 Like

I get an error when I try to use that code:

“The multi-part identifier “ShipTo_UD.CheckBox01” could not be bound.”

I’ve tried ShipTo.CheckBox01,ShipTo_UD.CheckBox01, ShipToList.CheckBox01, ShipToList_UD.CheckBox01 - they all give the same message (and interestingly if I use ShipTo.CheckBox01 it adds the _UD itself…)

Whats the trick?

It’s SQL syntax and on the SQL side the _UD isn’t used it’s the combined view in the dbo that is used. So anything typed should always be as I have it typed. From there couldn’t tell you. You’ve confirmed that the _UD table has a CheckBox01 added and it’s in the data model?

It appears in the Ship To grid, and in BAQ’s, so I would say it added and part of the data model

Hello Evan, I am sorry that I can’t help you. I was unable to accomplish the task in the BPM Workflow Designer because I couldn’t eliminate my error messages.
Best Wishes, Heide Warren

Heres an Ideas post I made to request this ability. Any support would be appreciated!

https://epicor-manufacturing.ideas.aha.io/ideas/KIN-I-3714

It seems like this is already in development? https://epicor-manufacturing.ideas.aha.io/ideas/ERP-I-1495

Possibly, but that post is from 2021 and there still isn’t an option. I am just trying to revive the topic and conversation as it still appears there is no good way of doing this.

Tim does a good job keeping status up to date on these now - if its in development we will likely see it in 2023.2 or 2024.1.

1 Like