Stan A
Stan A

Reputation: 143

Acumatica - creating a simple detail screen with header

Acumatica is seriously gonna make me cry. I have followed the tutorial in T100 to create a simple inquiry screen. When I open it, the screen is blank. I can see the layout in design view, when I load the screen it is blank.

My graph:

 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;

}

My page:

  <%@ 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 &#39;{0}&#39;.
Try to change filter or modify parameters above to see records here." NamedComboAddMessage="No records found as &#39;{0}&#39;.
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 &#39;{0}&#39;.
Try to change filter to see records here." NamedFilteredAddMessage="No records found as &#39;{0}&#39;.
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>

I wanted originally to create a lookup screen with no database fields, but I was getting the same result. I decided just o follow tutorial and create inquiry screen. I hate this framework.

Upvotes: 0

Views: 421

Answers (2)

Stan A
Stan A

Reputation: 143

It appears that FormDetail creation does not work in 17.204.0019. I created the screen in 17.202.0016 and it worked fine. I imported the screen into 17.204.0019 and it also worked. Can anyone confirm or deny this?

Upvotes: 0

Brendan
Brendan

Reputation: 5623

My guess is the Current<> display ID is not getting set so the query for the grid is empty. You can do a SQL trace to confirm but I would use CommitChange="True" on the filter field in your page...

<px:PXTextEdit ID="edDisplayID" runat="server" AlreadyLocalized="False" DataField="DisplayID" CommitChanges="True">

Upvotes: 1

Related Questions