Skip to content

Instantly share code, notes, and snippets.

@tdcbm
tdcbm / EpicorTraceLog.cs
Last active March 15, 2019 08:44
Epicor TraceLog
//Taken from https://e10help.com/t/how-to-write-your-own-trace-logs/44613/7
Epicor.Hosting.Trace.ServerLog.WriteTraceMessage(
"trace://ice/mytrace",
"TraceCategoryLabel",
() => "Some Text"
);
Epicor.Hosting.Trace.ServerLog.WriteTimedEntry(
"trace://ice/mytrace",
"TimedTraceLabel",
// For EpiShapes you set the status property to one of the following
// Type: Ice.Lib.Framework.StatusTypes
// Assembly: Ice.Lib.EpiClientLib, Version=3.1.600.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992
// MVID: CE0EF58F-0E9E-4B1F-886A-690A0D759180
// Assembly location: C:\Epicor\ERP10.1Client\Client\Ice.Lib.EpiClientLib.dll
namespace Ice.Lib.Framework
{
public enum StatusTypes
{
private void oTrans_adapter_BeforeAdapterMethod(object sender, BeforeAdapterMethodArgs args)
{
// ** Argument Properties and Uses **
// ** args.MethodName **
// ** Add Event Handler Code **
// ** Use MessageBox to find adapter method name
// EpiMessageBox.Show(args.MethodName)
switch (args.MethodName)
{
case "Update":
@tdcbm
tdcbm / GetKey5ForUD06.cs
Created March 23, 2018 08:16
GetKey5ForUD06
private static string GetKey5ForUD06(EpiDataView edvUD06, Ice.UI.App.UD06Entry.Transaction ud06Trans)
{
// Get unique row count id for Key5
int rowCount = edvUD06.dataView.Table.Rows.Count;
int lineNum = rowCount;
bool goodIndex = false;
while ((goodIndex == false))
{
// Check to see if index exists
DataRow[] matchingRows = edvUD06.dataView.Table.Select("Key5 = \'" + lineNum.ToString() + "\'");
@tdcbm
tdcbm / epi2.cs
Last active June 24, 2020 16:50
Epicor Launch Form with parameters
//Code src: http://lethanhname.blogspot.co.id/2014/03/epicor-launch-form-with-parameters.html
public void CallLot(string PartNum,string LotNum)
{
try
{
string[] CompoundKeys =new string[]{PartNum,LotNum};
CompoundKeyBinding cb=new CompoundKeyBinding(CompoundKeys,null,null);
LaunchFormOptions opts = new LaunchFormOptions();
opts.ValueIn=cb;
@tdcbm
tdcbm / TransferData.cs
Created March 20, 2018 02:39
using epicor InvTransferAdapter
//Code src: http://lethanhname.blogspot.co.id/2015/03/using-epicor-invtransferadapter.html
public void TransferData(DataRow editRow)
{
string PartNum = editRow["Character01"].ToString();
string UOM = editRow["Character07"].ToString();
InvTransferAdapter invTransferAdapter = new InvTransferAdapter(oTrans);
invTransferAdapter.BOConnect();
InvTransferDataSet transferRecord = invTransferAdapter.GetTransferRecord(PartNum, UOM);
invTransferAdapter.InvTransferData.Clear();
@tdcbm
tdcbm / epi1.cs
Last active March 20, 2018 02:47
Epicor Custom
private void oTrans_UD06Adapter_BeforeAdapterMethod(object sender, BeforeAdapterMethodArgs args)
{
switch (args.MethodName)
{
case "GetRows":
{
EpiSearchBase adapterSearchForm = oTrans_UD06Adapter.SearchForm;
adapterSearchForm.ClearEpiSearchColumns();
// Paramters: Data Column Name, Column Header Text, Width, Is Result, Position