Question

Last Cost is no longer being copy/pasted when copying a stock item after upgrade to 2023R2. Is this a bug/intentional change?

  • 11 March 2024
  • 2 replies
  • 37 views

Userlevel 5
Badge +1

We use copy/paste all the time when creating new items and have noticed that since upgrading from

2022 R2 Build 22.208.0012

to 2023 R2 Build 23.208.0026

when copying/pasting a stock item the Last Cost value is no longer included.

Is there an existing way to include/exclude fields from the copy/paste routine?  If not is it possible to customize the stock item screen in order to re-enable that functionality?

This is a significant issue as we have many items that need to be set up identically and it adds another step in the process which wasn’t there before.

 

Thanks for any advice you can provide,

Phil


2 replies

Userlevel 7
Badge +17

Hi @ppowell  Yes, I think this is internal change from the 23 R1 version. In the StockItemMaint.cs file, Acumatica has declared the VIEW to NOT to copy the LastCost field like below.

 

 

If you wanted to COPY the Last Cost Field, then you need to extend the graph and re-define the above VIEW without [PXCopyPasteHiddenFields] like below. This will solve your problem.

 

	public
SelectFrom<INItemCost>.
Where<INItemCost.inventoryID.IsEqual<InventoryItem.inventoryID.FromCurrent>.
And<INItemCost.curyID.IsEqual<AccessInfo.baseCuryID.FromCurrent>>>.
View ItemCosts;

 

Userlevel 5
Badge +1

@Naveen Boga I tried this but it didn’t work.  I’m not sure if I did it correctly though.

I created a new Customization Project and in Code clicked to add a new entry. I chose Graph Extension and PX.Objects,IN.InventoryItemMaint and added that to the resulting code:

 

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using PX.Api;
using PX.Api.Models;
using PX.Common;
using PX.Data;
using PX.Data.BQL;
using PX.Data.BQL.Fluent;
using PX.Data.WorkflowAPI;
using PX.Objects.AP;
using PX.Objects.AR;
using PX.Objects.CR;
using PX.Objects.CS;
using PX.Objects.DR;
using PX.Objects.GL;
using PX.Objects.PO;
using PX.Objects.SO;
using PX.Objects.RUTROT;
using PX.Objects.Common.Discount;
using PX.SM;
using ItemStats = PX.Objects.IN.InventoryRelease.Accumulators.Statistics.Item.ItemStats;
using ItemCost = PX.Objects.IN.InventoryRelease.Accumulators.Statistics.Item.ItemCost;
using SiteStatusByCostCenter = PX.Objects.IN.InventoryRelease.Accumulators.QtyAllocated.SiteStatusByCostCenter;
using PX.Objects.Common.GraphExtensions;
using PX.Objects.CM;
using PX.Objects.IN.GraphExtensions.InventoryItemMaintExt;
using PX.Objects.TX;
using PX.Objects.IN.InventoryRelease;
using PX.Objects;
using PX.Objects.IN;

namespace PX.Objects.IN
{
public class InventoryItemMaint_Extension : PXGraphExtension<PX.Objects.IN.InventoryItemMaint>
{
#region Event Handlers

public
SelectFrom<INItemCost>.
Where<INItemCost.inventoryID.IsEqual<InventoryItem.inventoryID.FromCurrent>.
And<INItemCost.curyID.IsEqual<AccessInfo.baseCuryID.FromCurrent>>>.
View ItemCosts;

#endregion
}
}

After publishing and testing copy/paste with an existing item containing a last cost it still didn’t paste the value.

 

Am I doing something wrong here? I have a feeling I’m putting this in the wrong place but not sure how to put it in the right place.

 

Thanks for your help,

 

Phil

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved