Skip to main content
Question

Acumatica 2025 R2 Ask() Dialog OK Button Not Working on Mobile App – Receive and Put Away / PO302020

  • December 29, 2025
  • 4 replies
  • 40 views

I am encountering an issue with a custom dialog (Ask / Simple Dialog) that works correctly in the Web UI but does not behave as expected in the Mobile App.

Screen

  • PO302020 – Receive and Put Away

Issue Description

I have implemented a custom Action Button that opens a dialog (popup) to display Adjacent Locations.
The dialog works correctly in the web application, but in the mobile app, the dialog opens and displays data, however the OK (Save) button does not work.  

Actual Behavior (Mobile App)

  • Dialog opens successfully

  • Data is displayed in the list

  • Clicking OK / Save does nothing  

    Mobile Screen Customization Code

update screen PO302020 {
update container "HeaderView" {
update layout "FooterLayout" {
update layout "Line2" {
add recordActionLink "AdjLocations"
}
}

add recordAction "AdjLocations" {
displayName = "Adjacent Locations"
behavior = Void
redirect = true
redirectToDialog = "AdjacentLocationsDlg"
}
}

add dialog AdjacentLocationsDlg {
openAs = List

add dialogAction "Ok" {
displayName = "Save"
dialogResult = "OK"
closeDialog = true
}

add dialogAction "Cancel" {
displayName = "Cancel"
dialogResult = "Cancel"
closeDialog = true
}

add container "AdjLoc" {
type = SelectionActionList
includeDialogActions = true

add field "LocationCD"
add field "Selected" {
special = "ListSelection"
}

add containerAction "OK" {
displayName = "Save"
}

add containerAction "Cancel" {
displayName = "Cancel"
}
}
}
}

ASPX Code (Web UI – Working Correctly)

<px:PXSmartPanel runat="server" ID="CstSmartPanel1"
Height="500px" Width="500px"
LoadOnDemand="True"
ShowAfterLoad="True"
Caption="Adjacent Locations"
Key="AdjLoc">

<px:PXGrid runat="server" ID="CstPXGrid1"
Height="300px" Width="100%"
DataSourceID="ds"
SkinID="Details"
SyncPosition="True">
<Levels>
<px:PXGridLevel DataMember="AdjLoc">
<Columns>
<px:PXGridColumn DataField="Selected" Type="CheckBox" Width="60" />
<px:PXGridColumn DataField="LocationCD" Width="140" />
</Columns>
</px:PXGridLevel>
</Levels>
</px:PXGrid>

<px:PXPanel runat="server" ID="CstPanel2">
<px:PXButton runat="server" ID="CstButton3" Text="SAVE" DialogResult="OK" />
<px:PXButton runat="server" ID="CstButton4" Text="CANCEL" DialogResult="Cancel" />
</px:PXPanel>
</px:PXSmartPanel>

4 replies

  • Freshman I
  • December 29, 2025

I have never tried to using smart panel in UI but in my assumption the save button does not callback in UI. I would suggest you try to debug it and see if your code is hit when you click the button in mobile.

Hope it can helps.


  • Author
  • Freshman I
  • December 30, 2025

While using the dialog box in the mobile application, selecting records it's a runtime error: ‘Sequence contains no matching elements’. The dialog opens and displays data correctly, but the error occurs during data selection.

Action Button code is :

   public PXAction<ScanHeader> AdjLocations;
        [PXButton(CommitChanges = true)]
       [PXUIField(DisplayName = "Adjacent Locations", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
        protected virtual IEnumerable adjLocations(PXAdapter adapter)
        {
        // You can define a constant or a localized string for the message
           const string Caption = "Adjacent Locations";
           
         if (AdjLoc.AskExt() == WebDialogResult.OK)
            {
        
                var filter = AdjLoc.Current;
                if (filter == null)
                {
                    return adapter.Get();
                }
      
             POReceipt doc = Base.Document.Current;
              
             if (doc == null)   return adapter.Get();
      
               POReceiptSplitToTransferSplitLink  ObjPORecSplit =
                            PXSelect< POReceiptSplitToTransferSplitLink,
                            Where< POReceiptSplitToTransferSplitLink.receiptNbr, Equal<Required<POReceiptSplitToTransferSplitLink.receiptNbr>>>>
                           .Select(Base, doc.ReceiptNbr);

              if (ObjPORecSplit == null)   return adapter.Get();
     
              INTran objINTran =
                          SelectFrom<INTran>
                          .Where<INTran.refNbr.IsEqual<@P.AsString>>
                          .OrderBy<Desc<INTran.lineNbr>>
                          .View
                          .Select(Base, ObjPORecSplit.TransferRefNbr)
                          .TopFirst;
      
               ItemAllocatedLocationsMaint ItemAllocatedLocationsGraph = PXGraph.CreateInstance<ItemAllocatedLocationsMaint>();
              
               INSiteMaint graph = PXGraph.CreateInstance<INSiteMaint>();
           
               // Load warehouse once
               INSite warehouse = PXSelect<INSite,
                                         Where<INSite.siteID, Equal<Required<INSite.siteID>>>>
                                        .Select(graph, objINTran.SiteID);

               graph.site.Current = warehouse;
                 
     
           List<int?> selectedLocationIDs = new List<int?>();  
            
          foreach (INLocation obj in AdjLoc.Select())
      {
   
    INLocationExt locExt = PXCache<INLocation>.GetExtension<INLocationExt>(obj);
              
    PXTrace.WriteInformation($"Selected={locExt?.Selected}");
    PXTrace.WriteInformation($"LocationID={obj.LocationID}, LocationCD={obj.LocationCD}");

           if (locExt.Selected == true)
             {    
                  
              selectedLocationIDs.Add(obj.LocationID);
      
               PXTrace.WriteInformation($"ALocationID={obj.LocationID}, ALocationCD={obj.LocationCD}");
  
              INLocation nextloc = SelectFrom<INLocation>
              .Where<INLocation.locationID.IsEqual<P.AsInt>
              .And<INLocation.siteID.IsEqual<P.AsInt>>>
              .View.Select(Base, obj.LocationID, obj.SiteID)
              .TopFirst;

              if (nextloc == null) return adapter.Get();

              // Set current location in warehouse
              graph.location.Current = nextloc;

              // Deactivate
              nextloc.Active = false;
              graph.location.Update(nextloc);
               }
            }

        if (selectedLocationIDs.Count== 0) return adapter.Get();
        // Save only once
        graph.Actions.PressSave();
      
        int? firstAdjLocationID = null;
        int? secondAdjLocationID = null;
        int? thirdAdjLocationID = null;

        if (selectedLocationIDs.Count >= 1)
            firstAdjLocationID = selectedLocationIDs[0];

        if (selectedLocationIDs.Count >= 2)
            secondAdjLocationID = selectedLocationIDs[1];
      
       if (selectedLocationIDs.Count >= 3)
            thirdAdjLocationID = selectedLocationIDs[2];

        // 4. Insert second split
          ItemAllocatedLocations ObjItemAlloLoc = new ItemAllocatedLocations();
    
               ObjItemAlloLoc.InventoryID=objINTran.InventoryID;
               ObjItemAlloLoc.SiteID=objINTran.SiteID;
               ObjItemAlloLoc.ToLocationID=objINTran.ToLocationID;
              
               ObjItemAlloLoc.FirstAdjLocationID = firstAdjLocationID;
               ObjItemAlloLoc.SecondAdjLocationID = secondAdjLocationID;
               ObjItemAlloLoc.ThirdAdjLocationID = thirdAdjLocationID;
               
                ItemAllocatedLocationsGraph.IALView.Insert(ObjItemAlloLoc);

                ItemAllocatedLocationsGraph.Actions.PressSave();
      
            AdjLoc.View.RequestRefresh();
      
           }
      
           return adapter.Get();
         
      }
    }

 


  • Freshman I
  • January 2, 2026

Hi,

Error ‘Sequence contains no matching elements’ normally related to LinQ and handle collection. You might need to check your code with query data. Put debugger into your function it should let you know which line of error causing issue. 


Forum|alt.badge.img+8
  • Captain II
  • January 2, 2026

Just to clarify, this works as intended in the web version?

 

From what I know, with the barcode engine you shouldn’t implement a straight PXAction, but rather a new class which inherits YourScanGraph.ScanCommand.

Something like this:

public sealed class NextLocation : PickPackShip.ScanCommand
{
public override string Code => "NEXTLOC";

public override string ButtonName => "ScanNextLocation";

public override string DisplayName => "Next Location";

protected override bool IsEnabled => Basis.DocumentIsEditable;

protected override bool Process()
{
//Your Logic Here

return true;
}
}