Reputation: 211
I am trying to write the Shipments widget for the Acumatica mobile app so that it can be used more like the web browser.
Specifically I want to be able to add serial numbers and bin locations to the line inventory items.
The problem I am having is if the line item has quantity 2 or more, I cannot get the Allocations screen to popup so that you can select and enter multiple SN's for that shipping line item. The error I most often receive is "Server error : 404". Which obviously means it is not finding/generating the web page for mobile app display.
Can anyone point me in the right direction as to what I am doing wrong?
Here is the code:
add container "ShipmentSummary" {
formActionsToExpand = 5
add layout "ShipmentHeader" {
displayName = "ShipmentHeader"
layout = "HeaderSimple"
add layout "ShipmentHeaderNbrRow" {
displayName = "ShipmentHeaderNbrRow"
layout = "Inline"
add field "ShipmentNbr"
add field "Status"
}
add layout "ShipmentQtyRow" {
displayName = "ShipmentQtyRow"
layout = "Inline"
add field "Operation"
add field "ShippedQuantity"
}
add layout "ShipmentCustomerRow" {
displayName = "ShipmentCustomerRow"
layout = "Inline"
add field "Customer"
}
add layout "ShipmentWarehouseID" {
displayName = "ShipmentWarehouseID"
layout = "Inline"
add field "WarehouseID"
}
add layout "ShipmentLocation" {
displayName = "ShipmentLocation"
layout = "Inline"
add field "Location"
}
}
add field "ShipmentDate" {
selectorDisplayFormat = Key
pickerType = Detached
}
add field "Workgroup" {
pickerType = Detached
}
add field "Owner" {
pickerType = Detached
}
add field "Description"
add group "OrderInfoGroup" {
displayName = "Orders"
collapsable = True
collapsed = True
add layout "OrdersLineInfo" {
displayName = "OrdersLineInfo"
layout = "Inline"
add field "Orders#OrderType"
add field "Orders#OrderNbr"
}
add layout "LineInvoiceInfo" {
displayName = "LineInvoiceInfo"
layout = "Inline"
add field "Orders#InvoiceType"
add field "Orders#InvoiceNbr"
}
add field "Orders#NoteText" {
displayName = "Order Notes"
textType = PlainMultiLine
}
}
add layout "DetailsTab" {
displayName = "Details"
layout = "DataTab"
add containerLink "DocumentDetails"
}
add recordAction "Save" {
behavior = Save
}
add recordAction "Cancel" {
behavior = Cancel
}
add containerAction "Insert" {
icon = "system://Plus"
behavior = Create
redirect = True
}
add recordAction "PutOnHoldAction" {
behavior = Record
}
add recordAction "ReleaseFromHoldAction" {
behavior = Record
}
add recordAction "ConfirmShipmentActionAction" {
behavior = Record
}
attachments {
}
}
add container "DocumentDetails" {
fieldsToShow = 2
listActionsToExpand = 1
formActionsToExpand = 2
containerActionsToExpand = 1
add group "LineInventoryIdGroup" {
displayName = "LineInventoryIdGroup"
collapsed = True
template = ExpansionPanel
add field "InventoryID" {
listPriority = 100
selectorDisplayFormat = Key
pickerType = Searchable
}
add field "Description" {
listPriority = 90
}
}
add field "Location"
add field "LotSerialNbr"
add layout "LineQuantityRow" {
displayName = "LineQuantityRow"
layout = "Inline"
add field "ShippedQty"
add field "UOM"
}
add layout "AllocationsTab" {
displayName = "Allocations"
layout = "DataTab"
add containerLink "Allocations"
}
add containerAction "Insert" {
icon = "system://Plus"
behavior = Create
}
add selectionAction "Delete" {
icon = "system://Trash"
behavior = Delete
}
add recordAction "Delete" {
icon = "system://Trash"
behavior = Delete
after = Close
}
add recordAction "Insert" {
displayName = "Add Another"
icon = "system://Plus"
behavior = Create
}
attachments {
}
}
add container "Allocations" {
visible = False
fieldsToShow = 3
listActionsToExpand = 2
formActionsToExpand = 3
containerActionsToExpand = 2
add field "InventoryID" {
selectorDisplayFormat = KeyDescription
listPriority = 100
}
add field "Location" {
pickerType = Attached
}
add field "LotSerialNbr" {
pickerType = Attached
}
add layout "AllocQtyRow"{
displayName = "AllocQtyRow"
layout = "Inline"
add field "Quantity" {
selectorDisplayFormat = KeyDescription
listPriority = 90
}
add field "UOM" {
selectorDisplayFormat = Key
listPriority = 80
}
}
add field "Description"
add containerAction "Insert" {
icon = "system://Plus"
behavior = Create
redirect = True
}
attachments {
}
}
}
Upvotes: 1
Views: 166
Reputation: 211
I was able to figure out what the issue was.
First, Acumatica documentation for the mobile app is not very informative. So, a great deal has to be just 'Trial and Error'.
For the issue of this problem, what I needed to do was pass the redirect to the "Allocations" container as a "$List" directive, AND, add into the Allocations container both a containerAction and recordAction for "Insert" of a new entry. (Below is the code)
add container "DocumentDetails" {
fieldsToShow = 2
listActionsToExpand = 1
formActionsToExpand = 2
containerActionsToExpand = 1
add group "LineInventoryIdGroup" {
displayName = "LineInventoryIdGroup"
collapsed = True
template = ExpansionPanel
add field "InventoryID" {
listPriority = 100
selectorDisplayFormat = Key
pickerType = Searchable
}
add field "Description" {
listPriority = 90
}
}
add field "Location"
add field "LotSerialNbr"
add layout "LineQuantityRow" {
displayName = "LineQuantityRow"
layout = "Inline"
add field "ShippedQty"
add field "UOM"
}
add containerAction "Insert" {
icon = "system://Plus"
behavior = Create
}
add selectionAction "Delete" {
icon = "system://Trash"
behavior = Delete
}
add recordAction "Delete" {
icon = "system://Trash"
behavior = Delete
after = Close
}
add recordAction "Insert" {
displayName = "Add Another"
icon = "system://Plus"
behavior = Create
}
add recordAction "LSSOShipLineBinLotSerial" {
behavior = Void
redirect = True
redirectToContainer = "Allocations$List"
}
attachments {
}
}
add container "Allocations" {
visible = False
fieldsToShow = 3
listActionsToExpand = 2
formActionsToExpand = 3
containerActionsToExpand = 2
add field "InventoryID" {
selectorDisplayFormat = KeyDescription
listPriority = 100
}
add field "Location" {
pickerType = Attached
}
add field "LotSerialNbr" {
pickerType = Attached
}
add layout "AllocQtyRow"{
displayName = "AllocQtyRow"
layout = "Inline"
add field "Quantity" {
selectorDisplayFormat = KeyDescription
listPriority = 90
}
add field "UOM" {
selectorDisplayFormat = Key
listPriority = 80
}
}
add field "ExpirationDate"
add field "Description"
add containerAction "Insert" {
icon = "system://Plus"
behavior = Create
}
add recordAction "Insert" {
displayName = "Add Another"
icon = "system://Plus"
behavior = Create
}
attachments {
}
}
}
Upvotes: 4