Acumatica移动端IN202501屏幕集成问题求助:选择LotSerialNbr后InventoryID选择器清空导致无法操作
It sounds like you're hitting a common mobile configuration snag where parent selector values get lost when interacting with a dependent child selector. Let's walk through the fixes to get your IN202501 screen working properly on mobile.
Key Issues & Solutions
The core problem is that the mobile app isn't properly maintaining the InventoryID value when you select a LotSerialNbr, and the selector dependencies aren't explicitly defined. Here's how to fix it:
1. Add Explicit Parent-Child Selector Binding
Mobile selectors need clear parent field references to retain context. Update your LotSerialNbr field definition to link it directly to InventoryID:
add field "LotSerialNbr" { parentField = "InventoryID" }
2. Enable Immediate Value Commit for Selectors
Add commitChanges = True to both fields to ensure their values are sent to the server immediately after selection. This locks in the InventoryID value before you interact with the LotSerialNbr selector:
add field "InventoryID" { commitChanges = True } add field "LotSerialNbr" { parentField = "InventoryID" commitChanges = True }
3. Verify Server-Side Selector Logic
Double-check your custom Acumatica-LotSerialNbrAttribute to ensure:
- The
LotSerialNbrPXSelector correctly filters based on the currentInventoryIDvalue - No
FieldUpdatedorRowSelectedevents are accidentally resetting theInventoryIDfield after selecting a lot/serial number
Updated Full Mobile Configuration
Here's your revised code with all fixes applied:
add screen IN202501 { add container "InventoryLotSerialContainers" { add field "InventoryID" { commitChanges = True } add field "LotSerialNbr" { parentField = "InventoryID" commitChanges = True } add group "Attributes" { displayName = "Attributes" collapsable = True add attributes "AttributesAttributes" } add recordAction "Save" { behavior = Save } add recordAction "Cancel" { behavior = Cancel } attachments { } } }
Why This Works
commitChanges = Trueensures the server knows the selectedInventoryIDimmediately, so theLotSerialNbrselector pulls the correct filtered valuesparentField = "InventoryID"tells the mobile app to retain the parent selector value when interacting with the child selector, preventing it from being cleared- This aligns the mobile configuration with the server-side selector dependencies your custom attribute relies on
If you still see issues after applying these changes, check the DAC field definitions for InventoryID and LotSerialNbr to ensure they have proper PXDBField and PXSelector attributes configured without conflicting logic.
内容的提问来源于stack exchange,提问作者Anhy

