ShipVia How to Inactivate

Do you see this anywhere the pricelist is retrieved?

And you did the Data Regen, and the App Pool recycle after adding UD column?

Insert a Show Message block between the Start and Set Var/Arg blocks. In that, display the parameter whereClause. That will show you what it is before you try setting it. It might show that this table uses multiple keys (like customer & list identifier)

@Hari_Dutt - I enabled tracing, and see that the method Erp.PriceLstHed.GetList is called when searching for a Price list in Price List Maintenance. So you might need to put the BPM on that BO instead of Erp.PriceLst.GetList -

You might need it on both (or maybe even more), as I see multiple potential BO’s

image

And some of them have multiple Methods that might need the BPM. For example, BO PriceLst has methods:
GetList and GetListFilterPriceList

Use tracing to find out which which BO and method you need.

1 Like

@ckrusen, Thanks for your support. You are right “Erp.PriceLstHed.GetList” is called when searching for a Price list in Price List Maintenance. it is working fine now.

I was hoping to use this to hide ‘UPS Consignment’ in the OrderHed.Payflag, but I didn’t see a GetList method being called in the trace. Seems like the dropdown is built in to Epicor… Is hiding list items possible using UI customization? Or am I missing something obvious?

If I can’t hide it, would a data directive driving an error pop-up on OrderHed any time that field is set to the ‘UPS Consignee’ code work and be efficient?

I’ll definitely use this in other places, though…

<tracePacket>
  <businessObject>Erp.Proxy.BO.SalesOrderImpl</businessObject>
  <methodName>GetPayBTFlagDefaults</methodName>
  <appServerUri>net.tcp://masked/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>9/1/2020 14:41:01:7683672 PM</localTime>
  <threadID>1</threadID>
  <correlationId>53f6ad68-797d-42e2-a0d2-5f0388ca4e91</correlationId>
  <executionTime total="67" roundTrip="40" channel="0" bpm="0" other="27" />
  <retries>0</retries>
  <parameters>
    <parameter name="ds" type="Erp.BO.SalesOrderDataSet">
      <SalesOrderDataSet xmlns="http://www.epicor.com/Ice/300/BO/SalesOrder/SalesOrder">
        <OrderHed>
snip...
  <paramDataSetChanges>
    <paramDataSet name="ds" useDataSetNbr="0">
snip...
  <changedValue tableName="OrderHed" rowState="Added" rowNum="0" colName="PayFlag"><![CDATA[SHIP]]></changedValue>

I originally did it by editing the filter in the control on a UI customization. The BPM is soooo … much better. Because it’s universal.

Just add an exception for a user so they can actually see the record when searching for it in Ship Via Maintenance

Looks like that “list” is pseudo-static

The field help lists them all - thus making me think they are fixed, and not from another table.

image

But the UI control seems otherwise:

edit

Maybe in the CustShip BO?

Replying to myself. I created 2 bpm’s (SalesOrd.GetPayBTFlagDefaults / Pre and Cust Ship.Update / Pre) to raise an exception when Payflag = UPSCON. If we can’t remove it from the list, at least we can stop them from using it!

image
image
image

That is a badass solution-- thanks! It worked great for me in a specific situation I found myself in. Thanks again!

Tim,
Thanks for the great post! I’m trying to mimic this to filter out the attachment Doc Types dropdown menu but it isn’t working. I’m posting what I’ve done in the hopes that you can see where I’ve gone wrong. It may be the wrong place to put the BPM in the first place, I’m not sure…

You can see when I click the dropdown, they are still visible:

Where did I go wrong?

Erin

Hello,
Thank you for these posts. They are very helpful.
My goal is to set specific ship to addresses on the customer>shipto screen as inactive and then remove them from the ship to search.
I have created a UD field on the Customer>ShipTo screen and linked it to ShipTo.CheckBox01. If the box is checked then the ShipTo address is inactive.
On the Order Entry>Header screen, I would like to click the search and see only ship to address for the specific customer and remove any inactive ship to addresses.
I am new to the trace, but when I click on the ship to button, I think the trace is BO.ShipToImpl and method GetList and/or BO.SalesOrderImpl and method ChangeShipToID.
Question 1) What method directive do I change?

I went to the method directive for BO.ShipTo.GetList (couldn’t find BO.ShipToImpl). In the editor I typed, “(ShipTo.CheckBox01 = FALSE)”. The BPM ran without a server error but it is returning all ship to addresses minus the one I made inactive and not limiting the search to only addresses that are for the specific customer of the sales order.
Question 2) When I clicked the ship to search (on a sales order) before the new BPM it only returned shipto addresses for the specific customer and after the BPM it is returning shipto addresses for all customers. Why? And how do I fix it?

I appreciate the collective knowledge of the group and I would be grateful for assistance to point me in the right direction.
Heide

Thats what we do. It also lets the existing orders flow through without breaking anything.

I’m trying to get the RoleCode list to return 3 options for a specific user group.
What’s the super (not secret) way to return several specific items from GetList?

I tried OR & comma’s, but no dice.

This code passes the syntax and saves, but errors when I refresh the dropdown list, or it doesn’t return the list at all.

Server error for | and &&:

 The data types nvarchar and nvarchar are incompatible in the '|' operator. ---> System.Data.SqlClient.SqlException: The data types nvarchar and nvarchar are incompatible in the '|' operator.

image

I then tried repeating RoleCode like, which passed syntax test and didn’t error, but also didn’t return the list.

"RoleCode like 'ULTDECMKR' | RoleCode like 'ENDUSER' | RoleCode like 'SPECIALIST'"

Same with separating by commas:

"RoleCode like 'ULTDECMKR', 'ENDUSER',  'SPECIALIST'"

Server error ’ Incorrect syntax near ‘ULTDECMKR’. when I tried:

"RoleCode like {'ULTDECMKR', 'ENDUSER', 'SPECIALIST'}"

Thanks for the help!

Have you tried IN?

RoleCode in (‘ULTDECMKR’, ‘ENDUSER’, ‘SPECIALIST’)

Like usually needs to have % in it.

RoleCode like ‘%END%’

2 Likes

Ken - Thank you! That worked exactly like I needed. Have a great weekend.

"RoleCode in ('ULTDECMKR', 'ENDUSER', 'SPECIALIST')"
1 Like

Just curious, did you try ||

If I recall correctly the single pipe is a bitwise OR.
3 | 4 = false (0011 or’d with 0100)
3 | 5 = true (0011 or’d with 0101)

And similarly for the single ampersand.

The bitwise comparison of two strings doesn’t make sense.

Calvin - I think I did, not sure. I don’t think it worked, because I was trying to return a list, instead of a boolean T/F, and would have needed to return separate true’s for each ‘item’.

Thanks for sharing about the bitwise OR. I didn’t realize it was literally looking to see if bits overlapped! Neat.

Did you figure this issue out?