Adapter Missing Using or Assembly In Customization E10

Hey,

I’m bleary eyed. I’m customizing the Job Traveler print dialog, and getting the error …
Compiling Custom Code …
----------errors and warnings------------
Error: CS0246 - line 101 (270) - The type or namespace name ‘UD14Adapter’ could not be found (are you missing a using directive or an assembly reference?)
Error: CS0246 - line 101 (270) - The type or namespace name ‘UD14Adapter’ could not be found (are you missing a using directive or an assembly reference?)
** Compile Failed. **

… on the script below.

Care to take a look?

Thanks,

Joe

// **************************************************
// Custom code for JobTravForm
// Created: 8/15/2017 3:18:36 PM
// **************************************************

extern alias Erp_Contracts_BO_JobAsmSearch;
extern alias Erp_Contracts_BO_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;

public class Script
{
// ** 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()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
	// Begin Wizard Added Variable Initialization

	this.JobTravForm.AfterToolClick += new Ice.Lib.Framework.AfterToolClickEventHandler(this.JobTravForm_AfterToolClick);
	// End Wizard Added Variable Initialization

	// Begin Wizard Added Custom Method Calls

	this.btnPlanner1.Click += new System.EventHandler(this.btnPlanner1_Click);
	// End Wizard Added Custom Method Calls
}

public void DestroyCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
	// Begin Wizard Added Object Disposal
	this.btnPlanner1.Click -= new System.EventHandler(this.btnPlanner1_Click);

	this.JobTravForm.AfterToolClick -= new Ice.Lib.Framework.AfterToolClickEventHandler(this.JobTravForm_AfterToolClick);
	// End Wizard Added Object Disposal

	// Begin Custom Code Disposal

	// End Custom Code Disposal
}
private void btnPlanner1_Click(object sender, System.EventArgs args)
{
	SearchOnPersonAdapterShowDialog();
}

private void SearchOnPersonAdapterShowDialog()
{
	// Wizard Generated Search Method
	// You will need to call this method from another method in custom code
	// For example, [Form]_Load or [Button]_Click

	bool recSelected;
	string whereClause = string.Empty;
	System.Data.DataSet dsPersonAdapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "PersonAdapter", out recSelected, true, whereClause);
	if (recSelected)
	{
		System.Data.DataRow adapterRow = dsPersonAdapter.Tables[0].Rows[0];

		txtPlanner1.Text = adapterRow["PersonID"].ToString();

	}
}


private void JobTravForm_AfterToolClick(object sender, Ice.Lib.Framework.AfterToolClickEventArgs args)
{
	if (Convert.ToString(args.Tool.Key) == "PrintPreviewTool" || Convert.ToString(args.Tool.Key) == "PrintServerTool" || Convert.ToString(args.Tool.Key) == "PrintClientTool")
		{		
			MessageBox.Show("Check - Traveler " +Convert.ToString(args.Tool.Key));
			
			// write to UD table
			string plannerOut = "";
			if(!String.IsNullOrEmpty(txtPlanner1.Text))
				plannerOut += txtPlanner1.Text + "~";
			// planner 2 - 5
			
			// make sure the string begins and ends with separator if not blank
			if(!String.IsNullOrEmpty(plannerOut))
				plannerOut = "~" + plannerOut;
			
			// write out to UD table
			UD14Adapter adapterUD14 = new UD14Adapter(oTrans); // **this is line 101**
			adapterUD14.BOConnect();

			bool resultUD = adapterUD14.GetByID("JobTraveler","PersonIDList","","","");

			if(resultUD)
			{
			//MessageBox.Show(adapterUD01.UD01Data.Tables["UD01"].Rows[0]["Number01"].ToString());
			MessageBox.Show(adapterUD14.UD14Data.UD14[0]["Key1"]);
			}

			adapterUD14.Dispose();
			
		}	
}

}

Hi,

You must use the Assembly Reference Manager to add the UD14 adapter reference

Thanks, Jaiker. That got me to the right place.

Joe