Solved

Custom Processing Screen: Cant edit fields from a custom DAC

  • 9 March 2022
  • 3 replies
  • 390 views

Userlevel 1

Hello All, 

I’m relatively new to developing Acumatica screens. I am working on a custom processing screen that will update on hold invoices post date to a date the user chooses. This updates invoices uploaded through the system via an API where a custom field was added to have these imports batched together. These batch numbers are stored in a custom table that I load on the processing form to enter the post date and then load invoices and update said post date based off a join with the batch number. 

I’ve got my DAC created, graph started, and screen created. However, I’ve hit a brick wall as to why the fields are don’t allow me to edit on the custom screen. Screen is just a grid with a process and process all button. See below for my settings, let me know if I can provide additional details outside of below, imagine whatever I’m missing I simply just don’t know to include. 

The field i’d like to be editable is “PostDate”. Here is a bit of the DAC, from the beginning to PostDate:

    [Serializable]
    [PXCacheName("Invoice API Imports")]
    public class InvoiceAPIImports : IBqlTable
    {
        #region ImportID
        [PXDBInt(IsKey = true)]
        [PXDefault]
        [PXUIField(DisplayName = "Import #", Required = true)]
        [PXSelector(typeof(Search<InvoiceAPIImports.importID>),
                    typeof(InvoiceAPIImports.importCD),
                    typeof(InvoiceAPIImports.importSystem),
                    typeof(InvoiceAPIImports.createdDateTime),
                    SubstituteKey = typeof(InvoiceAPIImports.importCD),
                    DescriptionField = typeof(InvoiceAPIImports.importSystem))]
        public virtual int? ImportID { get; set; }
        public abstract class importID : PX.Data.BQL.BqlInt.Field<importID> { }
        #endregion

        #region ImportCD
        [PXDBString(15, IsFixed = true, InputMask = "")]
        [PXUIField(DisplayName = "Import CD")]
        public virtual string ImportCD { get; set; }
        public abstract class importCD : PX.Data.BQL.BqlString.Field<importCD> { }
        #endregion

        #region PostDate
        [PXDBDate()]
        [PXDefault(typeof(AccessInfo.businessDate))]
        [PXUIField(DisplayName = "Post Date")]
        public virtual DateTime? PostDate { get; set; }
        public abstract class postDate : PX.Data.BQL.BqlDateTime.Field<postDate> { }
        #endregion

 

Graph beginning to select the table:

  public class CentralStatesImports : PXGraph<CentralStatesImports>
    {
        public PXCancel<InvoiceAPIImports> Cancel;
        public PXFilter<InvoiceAPIImports> Filter;
        [PXFilterable]

        public PXProcessing<
        InvoiceAPIImports
            > InvoiceAPIImports;

        public CentralStatesImports()

 

Grid\PostDate settings:

 

All fields on the screen are greyed out and doesn’t allow for editing besides the “Selected” checkbox. 

 

Sorry if I missed some info, just to new to know what potential piece I missed or didn’t do correctly. Any ideas would be appreciated.

Thanks,

Adam 

icon

Best answer by rajeshvemunoori31 9 September 2022, 10:59

View original

3 replies

I’m also having same requirement from client to have a date field on a processing screen. i’m stuck on it  too.

Userlevel 1
Badge

Hello @AJohnson and @development 

 

You can check below article for more information on same question.

https://stackoverflow.com/questions/58511863/how-come-pxuifield-attribute-disables-text-edit-boxes-on-a-processing-page-in-20

 

As mentioned in the above article, try to add a RowSelected event to enable required field in the screen.

 

protected virtual void _(Events.RowSelected<Tablename> e)
{
if (e.Row == null) return;


PXUIFieldAttribute.SetEnabled<Tablename.fieldame>(e.Cache, e.Row, true);

}

Thanks

Hello @AJohnson and @development 

 

You can check below article for more information on same question.

https://stackoverflow.com/questions/58511863/how-come-pxuifield-attribute-disables-text-edit-boxes-on-a-processing-page-in-20

 

As mentioned in the above article, try to add a RowSelected event to enable required field in the screen.

 

protected virtual void _(Events.RowSelected<Tablename> e)
{
if (e.Row == null) return;


PXUIFieldAttribute.SetEnabled<Tablename.fieldame>(e.Cache, e.Row, true);

}

Thanks

Thanks @rajeshvemunoori31 for the simple solution, i knew but i did not think it’ll work with processing screen grid as well.
Thanks again.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved