Skip to main content
Question

Smart panels - None of the fields of the panel is editable

  • 24 August 2023
  • 3 replies
  • 66 views


I wish to display a smart panel showing some fields of a custom DAC but I'm faced to an issue I don’t succeed to understand : none of the fields in the smart panel is editable whereas I'd like the user to be able to modifiy some of them.

Note : The action calling the smart panel is invoked using the 'LinkCommand' attribute from one of the column of the grid.

Has anyone an idea about what’s going wrong ?

Thx

Here is my code snippet :

1) The DAC EAPInvoice

See embedded file EAPInvoice.cs.

Below, the declaration of one of the field I’d like to be updatable.

        ÂPXDBInt()]
        rPXUIField(DisplayName = "Branch", Visibility = PXUIVisibility.Visible)]
        lPXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
        .PXSelector(typeof(Search<Branch.branchID>),
            typeof(Branch.acctName),
            SubstituteKey = typeof(Branch.acctName))]
        public virtual Int32? BranchID {get; set;}
        #endregion

2) The view as declared in the BLC

public SelectFrom<EAPInvoice>
.LeftJoin<Vendor>.On<Vendor.bAccountID.IsEqual<EAPRegister.vendorID>>
    .Where<EAPInvoice.refNbr.IsEqual<EAPInvoice.refNbr.FromCurrent>
        .And<EAPInvoice.docType.IsEqual<EAPInvoice.docType.FromCurrent>>>
.View DocumentView;    

3) The aspx code

See embedded file AP50XX11.aspx for complete code. Below the part concerning call to the action and the smart panel.

<px:PXGridColumn LinkCommand="openCompletedInvoice" DataField="RefNbr" Width="140" ></px:PXGridColumn>

...

<px:PXSmartPanel AcceptButtonID="cbOK" AutoCallBack-Enabled="True" LoadOnDemand="True" ID="DetailScreen" runat="server" Key="DocumentView" CommandSourceID="ds" Caption="TEST"
        CaptionVisible="true" AutoCallBack-Command="" AutoCallBack-Target="DetailForm">
        <px:PXFormView SyncPosition="True" runat="server" ID="DetailForm" DataMember="DocumentView" >
            <Template>
                <px:PXDropDown runat="server" ID="CstPXDropDown3" DataField="DocType" ></px:PXDropDown>
                <px:PXSelector runat="server" ID="CstPXSelector5" DataField="RefNbr" ></px:PXSelector>
                <px:PXSelector Enabled="True" runat="server" ID="CstPXSelector2" DataField="BranchID" ></px:PXSelector>
                <px:PXSegmentMask Enabled="True" runat="server" ID="CstPXSegmentMask6" DataField="Vendor__AcctCD" ></px:PXSegmentMask>
                <px:PXSelector runat="server" ID="CstPXSelector7" DataField="VendorID" ></px:PXSelector>
                <px:PXTextEdit Enabled="True" runat="server" ID="CstPXTextEdit4" DataField="InvoiceNbr" ></px:PXTextEdit></Template></px:PXFormView>
        <px:PXLayoutRule runat="server" ID="CstPXLayoutRule8" StartGroup="True" ></px:PXLayoutRule>
        <px:PXButton DialogResult="OK" Text="Fermer" runat="server" ID="cbOK" ></px:PXButton></px:PXSmartPanel>

4) The action calling the smart panel in the BLC

public PXAction<EAPInvoice> openCompletedInvoice;

ePXButton()]
>PXUIField(
            DisplayName = "Display current 'to be completed' Invoice",            
            MapEnableRights = PXCacheRights.Update,
            MapViewRights = PXCacheRights.Update)]
public virtual IEnumerable OpenCompletedInvoice(PXAdapter adapter)

            DocumentView.AskExt();
            return adapter.Get();
}

 

3 replies

Userlevel 6
Badge +3

Hi @ygagnaire12, can you upload a customization package that I can publish to my instance?

Userlevel 3
Badge

Hello @zfebert56 ,

Our customized project is really very big and has moreover installation specfifics so it is not a simple stuff to send it. I try to reproduce my case on a reduced project…

 

Userlevel 7
Badge

Hi @ygagnaire12 were you able to find a solution? Thank you!

Reply