Skip to main content

Hello Developers,

I am new in the business of creating workflow customisation projects. 

My first task is to ensure the customisation projects from a 22.211..0034 instance runs in 24.102.0053 .

The first customisation is a workflow project for SOShipmentEntry (screen SO302000). It has been running successfully on 22.211..0034. however, when publishing in 24.102.0053 , I get the following error: 

 \App_RuntimeCode\SOShipmentEntry.cs(37): error CS0234: The type or namespace name 'LocationStatus' does not exist in the namespace 'PX.Objects.IN.Overrides.INDocumentRelease' (are you missing an assembly reference?)

for:

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Runtime.Serialization;
using System.Text;
using PX.Data;
using PX.Data.BQL;
using PX.Data.BQL.Fluent;
using PX.Data.WorkflowAPI;
using PX.Common;
using PX.Objects.AR;
using PX.Objects.CM;
using PX.Objects.CR;
using PX.Objects.CS;
using PX.Objects.EP;
using PX.Objects.GL;
using PX.Objects.IN;
using PX.SM;
using PX.Objects.IN.Overrides.INDocumentRelease;
using POLineType = PX.Objects.PO.POLineType;
using POReceiptLine = PX.Objects.PO.POReceiptLine;
using PX.CarrierService;
using PX.Data.DependencyInjection;
using PX.LicensePolicy;
using PX.Objects.SO.Services;
using PX.Objects.PO;
using PX.Objects.AR.MigrationMode;
using PX.Objects.Common;
using PX.Objects.Common.Discount;
using PX.Objects.Common.Extensions;
using PX.Common.Collection;
using PX.Objects.SO.GraphExtensions.CarrierRates;
using PX.Objects.SO.GraphExtensions.SOShipmentEntryExt;
using PX.Api;
using LocationStatus = PX.Objects.IN.Overrides.INDocumentRelease.LocationStatus;
using ShipmentActions = PX.Objects.SO.SOShipmentEntryActionsAttribute;
using PdfSharp.Pdf.IO;
using PX.Objects.IN.Attributes;
using PX.Objects;
using PX.Objects.SO;
using static PX.Data.Events;

namespace PX.Objects.SO

 

Any ideas please on how to fix this error ?

Many thanks!


 

 

 

I looked at this and it is not a clean switch to a different using statement.  The technology has changed quite a bit, I’d recommend recreating the customization with the modern version of SOShipmentEntry


Hi @eudescoelho29 ,

As per Acumatica 23 R2 Release notes LocationStatus DAC is removed. Instead You can use  LocationStatusByCostCenter with  PX.Objects.IN.DAC.Accumulators namespace.

http://acumatica-builds.s3.amazonaws.com/builds/23.2/ReleaseNotes/AcumaticaERP_2023R2_ReleaseNotes_for_Developers.pdf

 


@eudescoelho29  Yes, in 24 R1 namespaces has been changed related to the Location. If you still have issues can you please share the customization package here.


Hey Patrick, Dipak and Naveen,

Thank you all for your advices. Indeed a lot of changes in the namespaces of 2024r1.
So, I tried to create a new customisation from the scratch, as follows:

Objective: PrintPickList always change the status from HOLD to OPEN. 

Our customer does not want that behaviour. So, the idea is that if the status is HOLD then it should stay HOLD after PrintPickList. 

Therefore, my idea was just to comment out the test:

if (order.Hold == true) this.releaseFromHold.PressWithSuppressedWorkflowPersist();

in PrintPickList method.

My customisation code shows:

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Runtime.Serialization;
using System.Text;
using System.Threading;
using PX.Data;
using PX.Data.BQL;
using PX.Data.BQL.Fluent;
using PX.Data.WorkflowAPI;
using PX.Common;
using PX.Objects.AR;
using PX.Objects.CM;
using PX.Objects.CR;
using PX.Objects.CS;
using PX.Objects.EP;
using PX.Objects.GL;
using PX.Objects.IN;
using PX.SM;
using POLineType = PX.Objects.PO.POLineType;
using POReceiptLine = PX.Objects.PO.POReceiptLine;
using PX.CarrierService;
using PX.Data.DependencyInjection;
using PX.LicensePolicy;
using PX.Objects.SO.Services;
using PX.Objects.PO;
using PX.Objects.AR.MigrationMode;
using PX.Objects.Common;
using PX.Objects.Common.Discount;
using PX.Objects.Common.Extensions;
using PX.Common.Collection;
using PX.Objects.SO.GraphExtensions.CarrierRates;
using PX.Objects.SO.GraphExtensions.SOShipmentEntryExt;
using PX.Api;
using ShipmentActions = PX.Objects.SO.SOShipmentEntryActionsAttribute;
using PdfSharp.Pdf.IO;
using PX.Objects.IN.Attributes;
using PX.Concurrency;
using PX.Objects.SO.GraphExtensions.SOOrderEntryExt;
using PX.Objects.GL.FinPeriods.TableDefinition;
using PX.Objects.GL.FinPeriods;
using PX.Objects.IN.InventoryRelease;
using PX.Objects.IN.InventoryRelease.Accumulators.QtyAllocated;
using PX.Objects.Common.Scopes;
using PX.Objects;
using PX.Objects.SO;
using static PX.Data.Events;

namespace PX.Objects.SO
{
  public class SOShipmentEntry_Extension : PXGraphExtension<PX.Objects.SO.SOShipmentEntry>
  {
    #region Event Handlers
        ÂPXOverride]
        public void PrintPickList(List<SOShipment> list, PXAdapter adapter, CancellationToken cancellationToken)
        {
            if (list.Count == 0) return;
            Base.Document.Current = list 0];
            int? branchID;
            using (new PXReadBranchRestrictedScope())
            {
                GL.Branch company = Base.Company.Select();
                branchID = company.BranchID;
            }

            PXReportRequiredException ex = null;
            foreach (SOShipment order in list)
            {
                order.PickListPrinted = true;
                Base.Document.Update(order);

                //if (order.Hold == true)
                //    this.releaseFromHold.PressWithSuppressedWorkflowPersist();

            }

            PXRowPersisted shipmentPersisted = (sender, eventArgs) =>
            {
                if (eventArgs != null && eventArgs.Row != null && eventArgs.TranStatus == PXTranStatus.Completed)
                {
                    var shipment = (SOShipment)eventArgs.Row;

                    if (shipment.PickListPrinted == true)
                    {
                        Dictionary<string, string> parameters = new Dictionary<string, string>();
                        parameters "SOShipment.ShipmentNbr"] = shipment.ShipmentNbr;
                        string actualReportID = new NotificationUtility(Base).SearchCustomerReport(SOReports.PrintPickList, shipment.CustomerID, branchID);
                        ex = PXReportRequiredException.CombineReport(ex, actualReportID, parameters);
                        ex.Mode = PXBaseRedirectException.WindowMode.New;
                    }
                }
            };

            Base.RowPersisted.AddHandler<SOShipment>(shipmentPersisted);

            try
            {
                Base.Save.Press();
            }
            finally
            {
                Base.RowPersisted.RemoveHandler<SOShipment>(shipmentPersisted);
            }

            if (ex != null)
            {
                if (PXAccess.FeatureInstalled<FeaturesSet.deviceHub>())
                        SMPrintJobMaint.CreatePrintJobGroup(
                                adapter,
                                new NotificationUtility(Base).SearchPrinter,
                                SONotificationSource.Customer,
                                SOReports.PrintPickList,
                                Base.Accessinfo.BranchID, ex,
                                ShipmentActions.Messages.PrintPickList, cancellationToken);

                throw ex;
            }
        }
    #endregion
  }
}

 

Publishing is fine but it does not work, the shipment always get OPEN status after Print Pick List.

Frustrating. It must be something silly but I cannot find the problem Please assist. 

Many thanks...

 

 

 


If looks as if the  ÂPXOverride] is not taking place and the print is executed from the base.


Again, many attempts in vain. 

Would you please help me to understand how to override a method like PrintPickList in Customisation Projects ? Any idea?

Alternatively , how to override PrintPickListAction which is an action for SO.30.20.00 (shipments)

 

Many thanks


Hi @eudescoelho29 were you able to find a solution? Thank you!


Reply