首页 > 解决方案 > Acumatica 移动应用程序分配不起作用

问题描述

我正在尝试为 Acumatica 移动应用程序编写 Shipments 小部件,以便可以像 Web 浏览器一样使用它。
具体来说,我希望能够将序列号和库位添加到行库存项目。我遇到的问题是,如果行项目的数量为 2 或更多,我无法弹出分配屏幕,以便您可以为该运输行项目选择并输入多个 SN。我最常收到的错误是“服务器错误:404”。这显然意味着它没有找到/生成用于移动应用显示的网页。

谁能指出我做错了什么的正确方向?

这是代码:

  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 {
    }
  }
}

标签: mobilecustomizationacumatica

解决方案


我能够弄清楚问题所在。
首先,移动应用程序的 Acumatica 文档信息量不大。因此,很多事情必须只是“反复试验”。

对于这个问题,我需要做的是将重定向传递给“Allocations”容器作为“$List”指令,并在 Allocations 容器中添加一个 containerAction 和 recordAction 以用于新条目的“Insert” . (下面是代码)

  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 {
    }
  }
}

推荐阅读