Custom Button to Mimic 'Refresh List'

I created an epiCombo that populates from a User Code Type. Sometimes after making a selection in this field, a user may need the field to go back to blank. I showed them how to right-click in the field and select ‘Refresh List’, but they would like a ‘Clear’ button instead.

I ran a trace on ‘Refresh List’; here are the results:

<tracePacket>
  <businessObject>Ice.Proxy.Lib.BOReaderImpl</businessObject>
  <methodName>GetRows</methodName>
  <appServerUri>net.tcp://epicor10/E10Prod/</appServerUri>
  <returnType>System.Data.DataSet</returnType>
  <localTime>12/14/2022 14:05:40:8351708 PM</localTime>
  <threadID>1</threadID>
  <correlationId>1742a9bf-7d68-43b1-b9ff-3aa1e09a80c1</correlationId>
  <executionTime total="7" roundTrip="7" channel="0" bpm="0" bpmDataForm="0" other="0" />
  <retries>0</retries>
  <parameters>
    <parameter name="serviceNamespace" type="System.String"><![CDATA[Ice:BO:UserCodes]]></parameter>
    <parameter name="whereClause" type="System.String"><![CDATA[CodeTypeID = 'OrderPri']]></parameter>
    <parameter name="columnList" type="System.String"><![CDATA[]]></parameter>
  </parameters>
</tracePacket>

I don’t actually know how to use the resulting information in the Button Click Event code (very new to this). Can anyone guide me toward the solution? Is there a better strategy to accomplish this epiCombo reset from the form interface?

I already tried using the following post to try coding the button: Clear EpiComboBox - #2 by tkoch

It’s obvious that I put it in the wrong place or used it in the wrong context because I got the following error:
Error: CS1955 - line 228 (1658) - Non-invocable member Ice.Lib.Framework.EpiTransaction.EpiDataViews’ cannot be used like a method.

put your view in square brackets instead of the parenthesis.

Like this:
EpiDataView edvOrderHed = (EpiDataView)oTrans.EpiDataViews[“OrderHed”];

Remember Epicor has this behaviour on all their dropdowns… Training them and convincing them to use the right click is your best option.

They are Users. You are the Expert. I would recommend educating them. Because are you going to customize all Screens? Its not that hard.

Ultimately there isnt any convincing needed. You are the Expert. You tell them this is the Process, viola. Case Closed.

It’ll cost you 200,000$ to maintain that :smiley: the ROI is slim to none.

1 Like

Thank you!

I actually ended up Commenting out that first line because I noticed the view was already called upon in InitializeCustomCode, but I also did notice the brackets/parentheses discrepancy after posting.

It’s working now. Thanks again!

Preach!

Actually if they want it blank they should just click the DELETE key on the keyboard. Not Right Click and Refresh. It takes no more effort than clicking the mouse on a button.

Ultimately, I know this is the correct answer. The more I learn from you and all the other experts on this forum, the more confidence I’ll have to push back.

“Just because we can, doesn’t mean we should”

1 Like