Uplift Customization from Vantage to E10 Help!

Hi!

I been trying to uplift a customization from Vantage to E10 in script editor. I have gotten it down to two errors (searching through the forum - thank you everybody) but am stuck. Any help would be appreciate it.

I have added the references to the screen but the only one i couldnt add was Epicor.Mfg.IF.IInventoryQtyAdj.dll cant seem to find this DLL in E10 client folder. i added

Erp.Adapters.InventoryQtyAdj.dll
Erp.Contracts.BO.InventoryQtyAdj.dll

I am not an expert but i get the gist of it. This was created before i arrived and we are currently upgrading.

Private Sub btnInvTransfer_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnInvTransfer.Click
'// ** Place Event Handling Code Here **
If Validate() =True Then

            Dim _qtyAdj As **InventoryQtyAdj**
            Dim invAdjDS As InventoryQtyAdjDataSet
            Try
            _qtyAdj = New **InventoryQtyAdj**(oTrans.Session.ConnectionPool)
            
            invAdjDS = New InventoryQtyAdjDataSet()
            invAdjDS=_qtyAdj.GetInventoryQtyAdj(edvPart.dataView(edvPart.Row)("PartNum"))
            Dim ucbTo As Ice.Lib.FrameWork.EpiUltraCombo
            ucbTo = ucbToWarehouse

Compiling Custom Code …

----------errors and warnings------------

Error: BC30002 - line 154 (1311) - Type ‘InventoryQtyAdj’ is not defined. (In Bold Above)
Error: BC30002 - line 157 (1314) - Type ‘InventoryQtyAdj’ is not defined. (In Bold Above)

** Compile Failed. **

this compiles fine in Vantage. Both are VB.

Thank you

Perhaps it should be an InventoryQtyAdjustAdapter;

Thanks Chris. i thought about that but its a BO in Vantage so i dont think it would be an adapter now

var bo = Ice.Assemblies.ServiceRenderer.GetService<InventoryQtyAdjustSvcContract>();
is how you’d get a ref to the BO

Thanks Chris!

How would i handle this line

Dim _boR As BOReader = new BOReader(PartForm.Session.ConnectionPool)

I know connectionpool is no longer available in E10. Trying to fix the this piece of the code.
Dim _boR As BOReader = new BOReader(PartForm.Session.ConnectionPool)
Dim ds As DataSet = _boR.GetList(“Warehse”,“Plant=’” & PartForm.Session.PlantID & “’”,“WarehouseCode,Description”)

You do handle by using something like this - not tested but will get you started

// **************************************************
// Custom code for E10Help
// Created: 9/28/2018 8:47:46 AM
// **************************************************
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 Ice.Proxy.Lib;
using Ice.Core;
using Erp.BO;
using Ice.BO;

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 **
	BOReaderImpl _boReader; 

	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
		_boReader = WCFServiceSupport.CreateImpl<BOReaderImpl>((Ice.Core.Session)oTrans.Session, Epicor.ServiceModel.Channels.ImplBase<Ice.Contracts.BOReaderSvcContract>.UriPath);
	}

	private void DoSomething()
	{
		DataSet ds = _boReader.List("Erp:BO:Warehse","Plant = '" + Session.PlantID + "'","WarehouseCode,Description");
	}

	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
	}
}
1 Like

Thank you! Trying this out!