INTran Not showing LotNumberNbr - acumatica

Good day
I have made a new Grid to show data from INTran(PX.Objects.IN.INTran)
I see there is a LotSerialNbr in the INTran DAC. But when I make a new PXSelect I don't see it in the "ADD DATA FIELDS" on my page.
I add the Lot/Serial Nbr(LotSerialNbr) when loading stock on the Inventory Receipts.
I have also checked INRegister and INTranSplit both not show the Lot Serial Nbr?
using System;
using PX.Data;
using PX.Objects.IN;
using PX.Objects.SO;
namespace Test
{
public class StockTransfer : PXGraph<StockTransfer>
{
public PXSave<MasterTable> Save;
public PXCancel<MasterTable> Cancel;
public PXFilter<MasterTable > MasterView;
public PXFilter<INTran> DetailsView;
[Serializable]
public class MasterTable : IBqlTable
{
}
[Serializable]
public class DetailsTable : IBqlTable
{
}
public PXSelect<INRegister> Register;
public PXSelect<INTran> INTran;
public PXSelect<INTranSplit > INTranSplit ;
}
}
How can I get the Lot Serial number to show on the grid?
edit here is the ASPX:
<%# Page Language="C#" MasterPageFile="~/MasterPages/FormDetail.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="ABIT1111.aspx.cs" Inherits="Page_ABIT1111" 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%"
TypeName="JVDLocationTransfer.TransferGrap"
PrimaryView="MasterView"
>
<CallbackCommands>
</CallbackCommands>
</px:PXDataSource>
</asp:Content>
<asp:Content ID="cont2" ContentPlaceHolderID="phF" Runat="Server">
<px:PXFormView ID="form" runat="server" DataSourceID="ds" DataMember="MasterView" Width="100%" Height="100px" AllowAutoHide="false">
<Template>
<px:PXLayoutRule ID="PXLayoutRule1" runat="server" StartRow="True"></px:PXLayoutRule>
<px:PXTextEdit runat="server" ID="CstPXTextEdit1" DataField="UsrFROMLocation" />
<px:PXTextEdit runat="server" ID="CstPXTextEdit2" DataField="UsrInventoryID" />
<px:PXTextEdit runat="server" ID="CstPXTextEdit3" DataField="UsrInventoryItemDescription" />
<px:PXTextEdit runat="server" ID="CstPXTextEdit4" DataField="UsrQty" />
<px:PXTextEdit runat="server" ID="CstPXTextEdit5" DataField="UsrReasonCode" />
<px:PXTextEdit runat="server" ID="CstPXTextEdit6" DataField="UsrSKU" />
<px:PXTextEdit runat="server" ID="CstPXTextEdit7" DataField="UsrUOM" /></Template>
</px:PXFormView>
</asp:Content>
<asp:Content ID="cont3" ContentPlaceHolderID="phG" Runat="Server">
<px:PXGrid ID="grid" runat="server" DataSourceID="ds" Width="100%" Height="150px" SkinID="Details" AllowAutoHide="false">
<Levels>
<px:PXGridLevel DataMember="INTran">
<Columns>
<px:PXGridColumn DataField="InventoryID" Width="70" />
<px:PXGridColumn DataField="LotSerialNbr" ></px:PXGridColumn></Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Container="Window" Enabled="True" MinHeight="150" />
<ActionBar >
</ActionBar>
</px:PXGrid>
</asp:Content>

The screen graph JVDLocationTransfer.TransferGrap declared in ASPX doesn't match the target StockTransfer graph. Also inexistent columns are declared on dataview like MasterView which points to empty DACs like MasterTable. Wizards functionality such as Add Data Field won't work properly in that context.

Related

How to make PXAction and PXUIFieldAttribute.SetEnabled Work

I do not know why my code is not working or something might be missing.
I am trying to do is use PXAction to disable as specific field, when I compile and run this it my browser would just load into infinity.
Thank you guys!
Here is my code
DAC:
#region RadnomTest
[PXDBString(20, IsUnicode = true)]
[PXUIField(DisplayName = "Random Test")]
public virtual string RadnomTest { get; set; }
public abstract class radnomTest : BqlString.Field<radnomTest> { }
#endregion
GRAPH
#region Toggle Readonly
public PXAction<ClientProfileNames> ReadonlyToggle;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Toggle Read-only")]
protected virtual void readonlyToggle(Events.RowSelected<ClientProfileNames> e)
{
var row = e.Row;
PXUIFieldAttribute.SetEnabled<ClientProfileNames.radnomTest>(e.Cache, row, true);
Actions.PressSave();
}
#endregion
PAGE
<asp:Content ID="cont1" ContentPlaceHolderID="phDS" Runat="Server">
<px:PXDataSource ID="ds" runat="server" Visible="True" Width="100%" PrimaryView="ClinetInfosMain" TypeName="OnlyForTesting.Graph.Profile.ClientProfileNamesMaint">
<CallbackCommands>
</CallbackCommands>
</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="ClinetInfosMain" TabIndex="2900">
<Template>
<px:PXLayoutRule runat="server" StartRow="True" StartColumn="True"/>
<px:PXTextEdit ID="edRadnomTest" runat="server" AlreadyLocalized="False" DataField="RadnomTest" IsClientControl="True">
</px:PXTextEdit>
</Template>
<AutoSize Container="Window" Enabled="True" MinHeight="200" />
</px:PXFormView>
</asp:Content>
Field state should be set from the RowSelected event, and not as the result of an action such a button click.
If you need to set the enabled status based on the value of another field, I would recommend checking the PXUIEnabled attribute which will let you handle this in a declarative fashion: https://asiablog.acumatica.com/2016/11/pxuienabled-and-pxuirequired-attributes.html

How to refresh a grid from a redirected page

I have an inquiry page where the Header is the POLine table and the grid is a new table linked to POLine. I cannot use an unbounded DAC for the filters because I want to offer the option to navigate over existing records.
If I open the page directly and enter the POLine information, the grid is refreshed correctly.
I included a button in the Purchase Orders page with an action that opens my inquiry page. In this scenario, the filter is loaded correctly but the grid does not show the records until the grid's refresh button is pressed.
This is my Action:
public PXAction<POOrder> Reconcile;
[PXUIField(DisplayName = "Reconcile", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
[PXButton(CommitChanges = true, OnClosingPopup = PXSpecialButtonType.Cancel)]
public virtual void reconcile()
{
POLine pOLineRow = Transactions.Current;
if (pOLineRow == null)
{
return;
}
if (pOLineRow.OrderNbr != null)
{
PEPOOrderReconciliationMaint pEPOOrderReconciliationgraph = PXGraph.CreateInstance<PEPOOrderReconciliationMaint>();
pEPOOrderReconciliationgraph.POOrderReconcileRecord.Current = pEPOOrderReconciliationgraph.POOrderReconcileRecord.Search<POLine.orderType, POLine.orderNbr, POLine.lineNbr>(pOLineRow.OrderType, pOLineRow.OrderNbr, pOLineRow.LineNbr, pOLineRow.OrderType);
if (pEPOOrderReconciliationgraph.POOrderReconcileRecord.Current != null)
{
throw new PXRedirectRequiredException(pEPOOrderReconciliationgraph, false, "PORECONCILIATION") { Mode = PXBaseRedirectException.WindowMode.NewWindow };
}
}
}
I have not used the Search<> method at a detail level before, but I found this Acumatica reference in POReceiptEntry:
POLineR polineR = _graph.purchaseLinesUPD.Search<POLineR.orderType, POLineR.orderNbr, POLineR.lineNbr>
(itemsource.OrderType, itemsource.OrderNbr, itemsource.LineNbr);
I also tried to assign the value directly with a PXSelect:
pEPOOrderReconciliationgraph.POOrderReconcileRecord.Current = PXSelect<POLine,Where<POLine.orderType,
Equal<Required<POLine.orderType>>,And<POLine.orderNbr,
Equal<Required<POLine.orderNbr>>,And<POLine.lineNbr,
Equal<Required<POLine.lineNbr>>>>>>
.Select(this, pOLineRow.OrderType, pOLineRow.OrderNbr, pOLineRow.LineNbr);
I don't think this is related to the error though. I think it's more oriented to a refresh option in the ASPX.
This is my ASPX code:
<%# Page Language="C#" MasterPageFile="~/MasterPages/FormDetail.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="PR501000.aspx.cs" Inherits="Page_PR501000" 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%" TypeName="Purchase.PEPOOrderReconciliationMaint" PrimaryView="POOrderReconcileRecord">
<CallbackCommands>
<px:PXDSCallbackCommand Name="SaveClose" Visible="false" PopupVisible="false"/>
<px:PXDSCallbackCommand Name="Save" Visible="false" CommitChanges="true"/>
<px:PXDSCallbackCommand Name="Cancel" Visible="true" CommitChanges="true"/>
<px:PXDSCallbackCommand Name="Insert" Visible="false" CommitChanges="true"/>
<px:PXDSCallbackCommand Name="CopyPaste" Visible="false" CommitChanges="true"/>
<px:PXDSCallbackCommand Name="Delete" Visible="false" CommitChanges="true"/>
</CallbackCommands>
</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="POOrderReconcileRecord" TabIndex="4500">
<Template>
<px:PXLayoutRule runat="server" StartColumn="True">
</px:PXLayoutRule>
<px:PXDropDown ID="edOrderType" runat="server" DataField="OrderType">
</px:PXDropDown>
<px:PXSelector ID="edOrderNbr" runat="server" DataField="OrderNbr" AutoRefresh="True" CommitChanges="True">
</px:PXSelector>
<px:PXLayoutRule runat="server" StartColumn="True"/>
<px:PXSelector ID="edLineNbr" runat="server" CommitChanges="True" DataField="LineNbr">
</px:PXSelector>
</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; margin-top: 0px;"
Width="100%" Height="150px" SkinID="Details" TabIndex="21000" KeepPosition="True" SyncPosition="True" AdjustPageSize="Manual">
<Levels>
<px:PXGridLevel DataKeyNames="OrderType,OrderNbr,LineNbr" DataMember="POReceiptLineRecord">
<RowTemplate>
<px:PXSegmentMask ID="edInventoryID" runat="server" DataField="InventoryID" CommitChanges="True" Size="M" Width="200px">
</px:PXSegmentMask>
<px:PXNumberEdit ID="edReceiptQty" runat="server" AlreadyLocalized="False" DataField="ReceiptQty" CommitChanges="True" Size="S">
</px:PXNumberEdit>
</RowTemplate>
<Columns>
<px:PXGridColumn DataField="InventoryID">
</px:PXGridColumn>
<px:PXGridColumn DataField="ReceiptQty" TextAlign="Right" Width="100px">
</px:PXGridColumn>
</Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Container="Window" Enabled="True" MinHeight="150" />
</px:PXGrid>
</asp:Content>
This is the PEPOOrderReconciliationMaint code:
public class PEPOOrderReconciliationMaint : PXGraph<PEPOOrderReconciliationMaint, POLine>
{
public PXSelect<POLine> POOrderReconcileRecord;
public PXSelect<POReceiptLine,
Where<
POReceiptLine.pOType, Equal<Current<POLine.orderType>>,
And<POReceiptLine.pONbr, Equal<Current<POLine.orderNbr>>,
And<POReceiptLine.pOLineNbr, Equal<Current<POLine.lineNbr>>>>>> POReceiptLineRecord;
#region Cache Attached
#region OrderType
[PXDBString(2, IsFixed = true, IsKey = true)]
[POOrderType.List()]
[PXUIField(DisplayName = "Type", Enabled = true)]
protected virtual void POLine_OrderType_CacheAttached(PXCache Sender)
{
}
#endregion
#region OrderNbr
[PXDBString(15, IsUnicode = true, InputMask = "", IsKey = true)]
[PXUIField(DisplayName = "Order Nbr.", Visible = true)]
[PXSelector(typeof(Search<POOrder.orderNbr,
Where<POOrder.orderType, Equal<Current<POLine.orderType>>>>))]
protected virtual void POLine_OrderNbr_CacheAttached(PXCache Sender)
{
}
#endregion
#region LineNbr
[PXDBInt(IsKey = true)]
[PXUIField(DisplayName = "Line Nbr.", Visible = true, Enabled = true)]
[PXSelector(typeof(Search<POLine.lineNbr,
Where<POLine.orderNbr, Equal<Current<POLine.orderNbr>>,
And<POLine.orderType, Equal<Current<POLine.orderType>>>>>))]
protected virtual void POLine_LineNbr_CacheAttached(PXCache Sender)
{
}
#endregion
#endregion
}

LinkedCommand & callbackcommand not doing anything

I'm trying to add an hyperlink from a field in a grid in a processing screen pointing to a custom object I made but it seems it doesnt do anything.
When I try to debug and set breakpoints it seems it doesnt even execute the code in my function.
I tried following this : How to create a hyperlink user field
And I tried to follow the example 3.4 in T200 (which is basically the same)
Here's my code :
public PXAction<ARRegister> ViewLettering;
[PXButton]
protected virtual void viewLettering()
{
ARRegister row = LinesPendingLettering.Current;
LELettering letPiece = PXSelect<LELettering,
Where<LELettering.letteringCD,
Equal<Required<LELettering.letteringCD>>>>
.Select(this, row.GetExtension<ARRegisterLeExt>().LettrageCD);
// Create instance of destination graph
LetteringAR graph = PXGraph.CreateInstance<LetteringAR>();
graph.Piece.Current = letPiece;
if (graph.Piece.Current != null)
{
throw new PXRedirectRequiredException(graph, true, Constantes.letteringPiece);
}
else
{
throw new PXException(Constantes.errNotFound);
}
}
#endregion
And the code of my page :
<%# Page Language="C#" MasterPageFile="~/MasterPages/FormDetail.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="LE202001.aspx.cs" Inherits="Page_LE202001" 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%"
TypeName="LE.ProcessAR"
PrimaryView="Filter"
>
<CallbackCommands>
<px:PXDSCallbackCommand Name="ViewLettering" Visible="False" DependOnGrid="grid" /></CallbackCommands>
</px:PXDataSource>
</asp:Content>
<asp:Content ID="cont2" ContentPlaceHolderID="phF" Runat="Server">
<px:PXFormView ID="form" runat="server" DataSourceID="ds" DataMember="Filter" Width="100%" Height="100px" AllowAutoHide="false">
<Template>
<px:PXLayoutRule StartColumn="True" ID="PXLayoutRule1" runat="server" StartRow="False"></px:PXLayoutRule>
<px:PXSelector CommitChanges="True" runat="server" ID="CstPXSelector2" DataField="BranchID" ></px:PXSelector>
<px:PXSelector AutoRefresh="True" CommitChanges="True" runat="server" ID="CstPXSelector1" DataField="AccountID" ></px:PXSelector>
<px:PXLayoutRule runat="server" ID="CstPXLayoutRule5" StartColumn="True" ></px:PXLayoutRule>
<px:PXNumberEdit runat="server" ID="CstPXNumberEdit3" DataField="TotalCredit" ></px:PXNumberEdit>
<px:PXNumberEdit runat="server" ID="CstPXNumberEdit4" DataField="TotalDebit" ></px:PXNumberEdit>
<px:PXLayoutRule runat="server" ID="CstPXLayoutRule6" StartColumn="True" />
<px:PXCheckBox CommitChanges="True" runat="server" ID="CstPXCheckBox7" DataField="ShowAll" ></px:PXCheckBox></Template>
</px:PXFormView>
</asp:Content>
<asp:Content ID="cont3" ContentPlaceHolderID="phG" Runat="Server">
<px:PXGrid SyncPosition="True" AutoAdjustColumns="True" ID="grid" runat="server" DataSourceID="ds" Width="100%" Height="150px" SkinID="Details" AllowAutoHide="false">
<Levels>
<px:PXGridLevel DataMember="LinesPendingLettering">
<Columns>
<px:PXGridColumn Type="CheckBox" AllowFilter="True" AllowCheckAll="True" CommitChanges="True" DataField="Selected" Width="30" ></px:PXGridColumn>
<px:PXGridColumn DataField="DocType" Width="70" ></px:PXGridColumn>
<px:PXGridColumn DataField="RefNbr" Width="70" ></px:PXGridColumn>
<px:PXGridColumn DataField="DocDesc" Width="200" ></px:PXGridColumn>
<px:PXGridColumn DataField="CuryOrigDocAmt" Width="100" ></px:PXGridColumn>
<px:PXGridColumn DataField="CuryID" Width="70" ></px:PXGridColumn>
<px:PXGridColumn LinkCommand="ViewLettering" DataField="LettrageCD" Width="70" ></px:PXGridColumn></Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Container="Window" Enabled="True" MinHeight="150" ></AutoSize>
<ActionBar >
</ActionBar>
</px:PXGrid>
</asp:Content>
The generic type parameter of PXAction has to be the same DAC as the primary view DAC.
The primary view attribute is set on PXDataSource element in the ASPX page:
<px:PXDataSource ID="ds" runat="server" PrimaryView="Filter">
In your graph or graph extension you can locate the primary view DAC:
public PXFilter<DAC> Filter;
Make sure the PXAction declaration is on the same DAC:
public PXAction<DAC> Action;
Adding an observation I had to this older thread, hoping it may help someone:
If you have everything setup as recommended but it is still not working, look carefully at your use of OrderBy in the View's delegate, specifically whether you defined an OrderBy<> directly on its PXSelectBase or used an OrderByNew<> later in
the delegate logic. Using OrderBy<> worked well, but using OrderByNew<> affected the functionality. Details:
The View:
[PXFilterable()]
public PXSelectOrderBy<DAC, OrderBy<Asc<DAC.field1>>> Records;
The Delegate:
protected virtual IEnumerable records()
{
PXSelectBase<DAC> cmd = new PXSelectJoinOrderBy<DAC,
InnerJoin<OtherDAC, On<DAC.field1, Equal<OtherDAC.field1>>>,
OrderBy<Desc<DAC.field1,
Desc<DAC.field2>>>>(this);
...
some filtering logic
...
// defining OrderByNew affected DependOnGrid/LinkCommand functionality
// cmd.OrderByNew<OrderBy<Desc<DAC.field1,
// Desc<DAC.field2>>>>();
foreach(DAC rec in cmd.Select())
yield return rec;
}
I am using 2018R1, Build 18.112.0019.

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 '{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>
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.
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">
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?

Create preview pane for grid

I want to create a preview pane below my custom grid on a tab, same as in other places it shows a preview below grid when I select any row.
I am using
PXGridWithPreview
And included
PreviewPanelTemplate
But, it is giving me below error
View AcumaticaActivities$Preview doesn't exist
I am not sure if I need to do any settings. Any suggestions?
Try to add PXPreviewAttribute to the selected view.
[PXPreview(typeof(TPrimaryView), typeof(TDacForPreview))]
public PXSelect<TPrimaryView,... AcumaticaActivities;
Here is the sample:
Graph code
public class SOPreview : PXGraph<SOPreview>
{
public PXCancel<SOOrder> Cancel;
[PXFilterable]
[PXPreview(typeof(SOOrder))]
public PXSelectJoin<SOOrder, LeftJoin<SOLine,
On<SOOrder.orderType, Equal<SOLine.orderType>,
And<SOOrder.orderNbr, Equal<SOLine.orderNbr>>>>> Orders;
public PXSelect<SOOrder,
Where<SOOrder.orderType, Equal<Current<SOOrder.orderType>>,
And<SOOrder.orderNbr, Equal<Current<SOOrder.orderNbr>>>>> Orders2;
public PXAction<SOOrder> View;
[PXUIField(DisplayName="View")]
[PXButton]
protected virtual IEnumerable view(PXAdapter a)
{
Orders2.AskExt();
return a.Get();
}
}
ASPX markup
<%# Page Language="C#" MasterPageFile="~/MasterPages/ListView.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="C9101000.aspx.cs" Inherits="Page_C9101000" Title="Untitled Page" %>
<%# MasterType VirtualPath="~/MasterPages/ListView.master" %>
<asp:Content ID="cont1" ContentPlaceHolderID="phDS" runat="Server">
<px:PXDataSource ID="ds" runat="server" Visible="True" Width="100%" PrimaryView="Orders" TypeName="GridWithPreview.SOPreview">
</px:PXDataSource>
<px:PXSmartPanel ID="pnlSODetail" runat="server" Style="z-index: 108;"
Caption="Sales Order Details" CaptionVisible="True"
Key="Orders2" ShowAfterLoad="false"
AutoRepaint="true"
AcceptButtonID="PXButtonOK">
<px:PXFormView ID="frmSO" runat="server" DataSourceID="ds" DataMember="Orders2" Width="100%"
Style="z-index: 100" TabIndex="17100">
<Template>
<px:PXLayoutRule runat="server" StartRow="True">
</px:PXLayoutRule>
<px:PXTextEdit ID="PXTextEdit1" runat="server" DataField="OrderType" Enabled="false">
</px:PXTextEdit>
<px:PXTextEdit ID="PXTextEdit2" runat="server" DataField="OrderNbr" Enabled="false">
</px:PXTextEdit>
<px:PXTextEdit ID="PXTextEdit3" runat="server" DataField="CustomerID" Enabled="false">
</px:PXTextEdit>
<px:PXTextEdit ID="PXTextEdit4" runat="server" DataField="OrderDesc" Enabled="false">
</px:PXTextEdit>
</Template>
</px:PXFormView>
<px:PXPanel ID="PXPanel1" runat="server" SkinID="Buttons">
<px:PXButton ID="pxBtnOK" runat="server" DialogResult="OK" Text="Close" />
</px:PXPanel>
</px:PXSmartPanel>
</asp:Content>
<asp:Content ID="cont2" ContentPlaceHolderID="phL" runat="Server">
<pxa:PXGridWithPreview ID="grid" runat="server" Height="400px" Width="100%" Style="z-index: 100"
AllowPaging="True" AllowSearch="True" DataSourceID="ds" TabIndex="100"
GridSkinID="Inquire"
PreviewPanelStyle="z-index: 100; background-color: Window"
PreviewPanelSkinID="Preview">
<Levels>
<px:PXGridLevel DataKeyNames="OrderType,OrderNbr" DataMember="Orders">
<Columns>
<px:PXGridColumn DataField="OrderType">
</px:PXGridColumn>
<px:PXGridColumn DataField="OrderNbr">
</px:PXGridColumn>
<px:PXGridColumn DataField="CustomerID" Width="120px">
</px:PXGridColumn>
<px:PXGridColumn DataField="OrderDate" Width="90px">
</px:PXGridColumn>
<px:PXGridColumn DataField="Status">
</px:PXGridColumn>
<px:PXGridColumn DataField="OrderDesc" Width="200px">
</px:PXGridColumn>
</Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Container="Window" Enabled="True" MinHeight="200" />
<PreviewPanelTemplate>
<px:PXHtmlView ID="edPreviewCtrl" runat="server" DataField="OrderDesc" TextMode="MultiLine" MaxLength="50" Width="100%" Height="100px" SkinID="Label">
<AutoSize Container="Parent" Enabled="true"></AutoSize>
</px:PXHtmlView>
</PreviewPanelTemplate>
<GridMode AllowAddNew="False" AllowDelete="False" />
</pxa:PXGridWithPreview>
</asp:Content>

Resources