Acumatica真的会让我哭泣。我按照T100中的教程创建了一个简单的查询屏幕。当我打开它时,屏幕是空白的。我可以在设计视图中看到布局,当我加载屏幕时它是空白的。
我的图表:
public class QLInventoryMaint : PXGraph<QLInventoryMaint>
{
public QLInventoryMaint()
{
ResponseRec.Cache.AllowInsert = false;
ResponseRec.Cache.AllowDelete = false;
ResponseRec.Cache.AllowUpdate = false;
}
[Serializable]
public class StrainFilter : IBqlTable
{
#region DisplayID
public abstract class displayID : PX.Data.IBqlField
{
}
protected String _DisplayID;
[PXString(4)]
[PXUIField(DisplayName = "Display ID")]
public virtual String DisplayID
{
get
{
return this._DisplayID;
}
set
{
this._DisplayID = value;
}
}
#endregion
}
public PXCancel<StrainFilter> Cancel;
public PXFilter<StrainFilter> StrainFilterRec;
[PXFilterable]
public PXSelectReadonly<StrainResult, Where<StrainResult.displayID, Equal<Current<StrainFilter.displayID>>>> ResponseRec;
}
我的页面:
<%@ Page Language="C#" MasterPageFile="~/MasterPages/FormDetail.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="SO301010.aspx.cs" Inherits="Page_SO301010" Title="Untitled Page" %>
<%@ MasterType VirtualPath="~/MasterPages/FormDetail.master" %>
<asp:Content ID="cont1" ContentPlaceHolderID="phDS" Runat="Server">
<px:PXDataSource ID="ds" runat="server" Visible="True" Width="100%" PrimaryView="StrainFilterRec" TypeName="PX.Objects.SO.QLInventoryMaint">
</px:PXDataSource>
</asp:Content>
<asp:Content ID="cont2" ContentPlaceHolderID="phF" Runat="Server">
<px:PXFormView ID="form" runat="server" DataSourceID="ds" Style="z-index: 100"
Width="100%" DataMember="StrainFilterRec" TabIndex="2500">
<Template>
<px:PXLayoutRule runat="server" StartRow="True"/>
<px:PXTextEdit ID="edDisplayID" runat="server" AlreadyLocalized="False" DataField="DisplayID" DefaultLocale="">
</px:PXTextEdit>
</Template>
</px:PXFormView>
</asp:Content>
<asp:Content ID="cont3" ContentPlaceHolderID="phG" Runat="Server">
<px:PXGrid ID="grid" runat="server" DataSourceID="ds" Style="z-index: 100"
Width="100%" Height="150px" SkinID="Details" TabIndex="3500" TemporaryFilterCaption="Filter Applied">
<EmptyMsg ComboAddMessage="No records found.
Try to change filter or modify parameters above to see records here." NamedComboMessage="No records found as '{0}'.
Try to change filter or modify parameters above to see records here." NamedComboAddMessage="No records found as '{0}'.
Try to change filter or modify parameters above to see records here." FilteredMessage="No records found.
Try to change filter to see records here." FilteredAddMessage="No records found.
Try to change filter to see records here." NamedFilteredMessage="No records found as '{0}'.
Try to change filter to see records here." NamedFilteredAddMessage="No records found as '{0}'.
Try to change filter to see records here." AnonFilteredMessage="No records found.
Try to change filter to see records here." AnonFilteredAddMessage="No records found.
Try to change filter to see records here."></EmptyMsg>
<Levels>
<px:PXGridLevel DataKeyNames="DisplayID" DataMember="ResponseRec">
<Columns>
<px:PXGridColumn DataField="Name" Width="200px">
</px:PXGridColumn>
<px:PXGridColumn DataField="Abbreviation">
</px:PXGridColumn>
<px:PXGridColumn DataField="ClonesCount" TextAlign="Right">
</px:PXGridColumn>
<px:PXGridColumn DataField="PlantsCount" TextAlign="Right">
</px:PXGridColumn>
<px:PXGridColumn DataField="HarvestedCount" TextAlign="Right">
</px:PXGridColumn>
<px:PXGridColumn DataField="WetFlowerWeight" TextAlign="Right">
</px:PXGridColumn>
<px:PXGridColumn DataField="DryFlowerWeight" TextAlign="Right">
</px:PXGridColumn>
</Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Container="Window" Enabled="True" MinHeight="150" />
</px:PXGrid>
</asp:Content>
我原本想创建一个没有数据库字段的查找屏幕,但我得到了相同的结果。我决定只是按照教程和创建查询屏幕。我讨厌这个框架。
答案 0 :(得分:1)
我的猜测是Current<>
显示ID未设置,因此网格查询为空。您可以执行SQL跟踪来确认,但我会在页面的过滤器字段中使用CommitChange="True"
...
<px:PXTextEdit ID="edDisplayID" runat="server" AlreadyLocalized="False" DataField="DisplayID" CommitChanges="True">
答案 1 :(得分:0)
看起来FormDetail创建在17.204.0019中不起作用。我在17.202.0016创建了屏幕,它工作正常。我将屏幕导入17.204.0019,它也有效。任何人都可以确认或否认这个吗?