Add "find by assembly sequence number" into job tree search

You can add this one yourself with a little bit of customization.
Here’s a quick one boiler plate. You’ll have to write the actual lookup yourself but it gets you most of the way there

// **************************************************
// Custom code for JobEntryForm
// Created: 7/26/2018 12:18:09 PM
// **************************************************

extern alias Erp_Contracts_BO_Project;
extern alias Erp_Contracts_BO_Part;

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 **
	MenuItem findAssy =null;
	
	public void InitializeCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
		// Begin Wizard Added Variable Initialization

		// End Wizard Added Variable Initialization

		// Begin Wizard Added Custom Method Calls

		// End Wizard Added Custom Method Calls
		findAssy =  new MenuItem("Go To Assy Num", new EventHandler(cmFindAssy));
		
		
		oTrans.JobTree.BeforeShowContextMenu += new Ice.Lib.Framework.JobLib.MethodTree.BeforeShowContextMenuHandler(jobTree_BeforeShowContextMenu1);
		
	}

	public void DestroyCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
		// Begin Wizard Added Object Disposal

		// End Wizard Added Object Disposal

		// Begin Custom Code Disposal

		// End Custom Code Disposal
		oTrans.JobTree.BeforeShowContextMenu -= new Ice.Lib.Framework.JobLib.MethodTree.BeforeShowContextMenuHandler(jobTree_BeforeShowContextMenu1);
	}
	private void cmFindAssy(object sender, System.EventArgs e)
    {
		MessageBox.Show("Do Search ,lookup work here");
	}
	private void jobTree_BeforeShowContextMenu1(object sender, Ice.Lib.Framework.JobLib.MethodTree.NodeArgs e)
    {
		oTrans.JobTree.TreeContextMenu.MenuItems.Add(findAssy);
	}
}

image

image

1 Like