Skip to content

Instantly share code, notes, and snippets.

View hasokeric's full-sized avatar
👋

Haso Keric hasokeric

👋
View GitHub Profile
@hasokeric
hasokeric / Erp.ARInvoice.GetShipments.POST.TempJCInvcDtlBugFix.cs
Last active July 14, 2022 04:13
Temporary BPM to Fix Epicor Bug when Job is closed before invoicing. Using EXACT same algorithm Epicor uses. The Bug has been reported to Epicor and should be fixed in the future.
// Populate Job Costing Fields on InvcDtl when the Job is closed
//
// NOTES:
// Usually Job Closing Costs are populated when the Job is closed
// however if the Job has been closed before Invoicing the JC Costs
// are not populated. The manual is to open the job and close it again.
// Hence why this BPM was created to populate the JC Costs without
// having to open and close the job.
//
@hasokeric
hasokeric / EpicorSequenceTables.txt
Created November 17, 2020 18:14
Epicor Sequence Tables
SELECT * FROM Erp.KeyLast;
SELECT * FROM Erp.CompanySequence;
SELECT * FROM Ice.SysSequence;
/**
* Initialize the File Trigger Watcher which will monitor the fullFilePath
* directory and when the BPM writes a new file it will read the file and
* based on the contents of the file we can do certain actions think of it as a
* bridge to have the BPM Communicate with our C# Code
*
* @type Custom Function
* @return void
*/
private void InitializeFileTriggerWatcher()
@hasokeric
hasokeric / EpicorFeatureFlags.cs
Last active July 11, 2020 21:10
Epicor Feature Flags
FeatureFlags.InAppNotifications = new Guid("79479C59-021B-40C4-A8D3-2F859FD8CD6B");
FeatureFlags.CdcConfigureDeleteProcessedLogs = new Guid("380B0652-1C47-477F-B25F-C4937EB44185");
FeatureFlags.EnableReportTaskRetry = new Guid("2B53219E-16E6-49ED-9195-66449046371F");
FeatureFlags.EnforeceProcessCallingRules = new Guid("056D0F09-7058-4FED-A7D9-5B969D57FE6D");
FeatureFlags.IdentityProvider = new Guid("8FA3AF1A-89B8-4978-8812-7245A02ACFF2");
FeatureFlags.KineticUI = new Guid("1E17815F-1381-4D9E-B1BA-E57FC86625EE");
FeatureFlags.ApiV2 = new Guid("4A9BF629-F65E-415C-BF18-8C10683C56DF");
Add to your .sysconfig
@hasokeric
hasokeric / Ice.Menu.GetRows.POST.AuditorMenuOverride.cs
Created July 11, 2020 07:07
Ice.Menu.GetRows Post-Processing
// Set Auditor Role Menu Maintenance Items as Readonly
//
// OptionType:
// A = BAQ Report, OptionType S = Sub Menu, I = Menu Item (Program), B = Report Builder Report Link, C = Assembly Dashboard, D = Runtime, N = Process
//
// OptionSubType:
// F = Form T = Tracker M = Maintenance P = Process R = Report E = Entry
//
// Get All Menu Items of type Form, Maintenance or Entry
@hasokeric
hasokeric / EpicorKeyControlSelectNextControl.cs
Created May 29, 2020 19:43
Epicor oTrans.KeyControl Next Control
((Control)oTrans.KeyControl).Parent.SelectNextControl((Control)oTrans.KeyControl, true, true, true, true);
@hasokeric
hasokeric / EpicorUBAQFromCustomization.cs
Created April 15, 2020 18:12
Epicor UBAQ C# - Invoke UBAQ from Customization
// Epicor UBAQ C# - Invoke UBAQ from Customization
// Invoke UBAQ from Customization, shows how to add new Rows and then when Update is called they are Mass Updated (I do have Allow Multi Row Update on my BAQ, not sure if it matters).
public System.Data.DataSet xyz()
{
// Declare and create an instance of the Adapter.
DynamicQueryAdapter adapterDynamicQuery = new DynamicQueryAdapter(this.oTrans);
adapterDynamicQuery.BOConnect();
// Declare and Initialize Variables
@hasokeric
hasokeric / FixRecordLaborDtlUBAQ.cs
Created March 24, 2020 18:23
LaborDtl Fix Record Epicor
// <auto-generated>
// This code was generated by a tool. Any changes made manually will be lost
// the next time this code is regenerated.
// </auto-generated>
using (var updater = this.getDataUpdater("Erp", "LaborDtl"))
{
var ttResultQuery = ttResults
.Where(row => !string.IsNullOrEmpty(row.RowMod) && row.RowMod != "P");
@hasokeric
hasokeric / grdPayments.cs
Created March 2, 2020 20:43
grdPayments.cs
this.grdPaymentSched.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
this.grdPaymentSched.DisplayLayout.MaxBandDepth = 1;
this.grdPaymentSched.DisplayLayout.Override.AllowDelete = Infragistics.Win.DefaultableBoolean.False;
this.grdPaymentSched.DisplayLayout.Override.AllowMultiCellOperations = ((Infragistics.Win.UltraWinGrid.AllowMultiCellOperation)((Infragistics.Win.UltraWinGrid.AllowMultiCellOperation.Copy | Infragistics.Win.UltraWinGrid.AllowMultiCellOperation.CopyWithHeaders)));
this.grdPaymentSched.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortSingle;
this.grdPaymentSched.DisplayLayout.ViewStyle = Infragistics.Win.UltraWinGrid.ViewStyle.SingleBand;
this.grdPaymentSched.DocCurrencyCols = new string[0];
this.grdPaymentSched.EpiAllowPaste = false;
this.grdPaymentSched.EpiAllowPasteInsert = false;
this.grdPaymentSched.EpiAutoFit = false;
@hasokeric
hasokeric / EpicorTryGetValueExample.cs
Last active February 19, 2020 18:12
Epicor Example TryGetValue
/// <summary>
/// Helper to check if Part Number Generator Module is Enabled
/// </summary>
public bool GetIsPNGEnabled()
{
MessageBox.Show(Convert.ToString(GetCompanyValue<bool>("XaSyst", "PNGEnabled_c")));
MessageBox.Show(GetCompanyValue<string>("XaSyst", "DefaultPlant"));
string sValue;
if (TryGetCompanyValue<string>("XaSyst", "DefaultPlant", out sValue))