Skip to main content
Solved

Need to Override INComponentLineSplittingExtension to Prevent Location Clearing

  • July 22, 2026
  • 2 replies
  • 23 views

We are attempting to upgrade from 24R2 to the 26R1 release of Acumatica, and one of the changes in this release or the previous one is that the Kit Assembly Component Splits looks to prevent the line from defaulting the location for parts with serial numbers that are user-entered on receipt.

 

public class INComponentLineSplittingExtension : LineSplittingExtension<KitAssemblyEntry, INKitRegister, INComponentTran, INComponentTranSplit>
{

protected override void SetUnassignedQty(INComponentTran line, decimal detailsBaseQty, bool allowNegative)
{
base.SetUnassignedQty(line, detailsBaseQty, allowNegative);

UpdateUnassignedLine(line);
}

protected virtual void UpdateUnassignedLine(INComponentTran line)
{
if ((line.UnassignedQty ?? 0) == 0
|| line.TranType != INTranType.Assembly) return;

if (line.LocationID != null
line.LocationID = null;

if (line.LotSerialNbr != null)
line.LotSerialNbr = null;

if (line.ExpireDate != null)
line.ExpireDate = null;
}
}

This becomes an issue specifically for serialized items because we normally scan items in which is location based. We contacted Acumatica support and they responded saying it works as intended and we'd need to override the logic to fit our business model.

I've had several failed attempts of overriding this particular section and I'd like a recommendation of preventing the nulling of the location.

Best answer by darylbowman

Try something like this:

using System;
using PX.Data;
using PX.Objects.IN;
using PX.Objects.IN.GraphExtensions.KitAssemblyEntryExt;

namespace MyProject
{
public class INComponentLineSplittingExtension_KeepLocation : PXGraphExtension<INComponentLineSplittingExtension, KitAssemblyEntry>
{
/// Overrides <seealso cref="INComponentLineSplittingExtension.UpdateUnassignedLine(INComponentTran)"/>
[PXOverride]
public void UpdateUnassignedLine(INComponentTran line, Action<INComponentTran> base_UpdateUnassignedLine)
{
int? locationID = line.LocationID;
base_UpdateUnassignedLine(line);
line.LocationID = locationID;
}
}
}

 

2 replies

darylbowman
Captain II
Forum|alt.badge.img+17

Try something like this:

using System;
using PX.Data;
using PX.Objects.IN;
using PX.Objects.IN.GraphExtensions.KitAssemblyEntryExt;

namespace MyProject
{
public class INComponentLineSplittingExtension_KeepLocation : PXGraphExtension<INComponentLineSplittingExtension, KitAssemblyEntry>
{
/// Overrides <seealso cref="INComponentLineSplittingExtension.UpdateUnassignedLine(INComponentTran)"/>
[PXOverride]
public void UpdateUnassignedLine(INComponentTran line, Action<INComponentTran> base_UpdateUnassignedLine)
{
int? locationID = line.LocationID;
base_UpdateUnassignedLine(line);
line.LocationID = locationID;
}
}
}

 


  • Author
  • Freshman I
  • July 22, 2026

Thank you, that did the trick!