I’m trying to customize the report quantity screen and bring in the JobEntry table. What I’m trying to accomplish is to have a check box on report quanity, if they select it go into Job entry and set job complete to true.
Below is all I have for the code but it errors when I run it thru the debugger on the object not set to an instance of an object on oTrans_endAdapter.BeforeAdapterMethod += new BeforeAdapterMethod(oTrans_endAdapter_BeforeAdapterMethod);.
I’m sure it’s something stupid, what am I missing.
// **************************************************
// Custom code for RQForm
// Created: 9/23/2024 1:24:45 PM
// **************************************************
extern alias Erp_Contracts_BO_JobEntry;
extern alias Erp_Contracts_BO_JobAsmSearch;
extern alias Erp_Contracts_BO_JobMtlSearch;
extern alias Erp_Contracts_BO_JobOperSearch;
extern alias Erp_Adapters_JobEntry;
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Erp.Adapters;
using Erp.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
using Erp.BO;
using Ice.BO;
using Erp.Proxy.BO;
public class Script
{
private EpiBaseAdapter oTrans_endAdapter;
// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
// Begin Wizard Added Module Level Variables **
// End Wizard Added Module Level Variables **
// Add Custom Module Level Variables Here **
public void InitializeCustomCode()
{
oTrans_endAdapter = (EpiBaseAdapter)csm.TransAdaptersHT["oTrans_endAdapter"];
oTrans_endAdapter.BeforeAdapterMethod += new BeforeAdapterMethod(oTrans_endAdapter_BeforeAdapterMethod);
}
public void DestroyCustomCode()
{
oTrans_endAdapter.BeforeAdapterMethod -= new BeforeAdapterMethod(oTrans_endAdapter_BeforeAdapterMethod);
oTrans_endAdapter = null;
}
private void oTrans_endAdapter_BeforeAdapterMethod(object sender, BeforeAdapterMethodArgs args)
{
switch (args.MethodName)
{
case "Update":
break;
default:
break;
}
}
}