Skip to main content
Solved

Custom Processing Screen: Cant edit fields from a custom DAC

  • 9 March 2022
  • 3 replies
  • 459 views

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:

    pSerializable]
    SPXCacheName("Invoice API Imports")]
    public class InvoiceAPIImports : IBqlTable
    {
        #region ImportID
        PXDBInt(IsKey = true)]
        [PXDefault]
        rPXUIField(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
        aPXDBString(15, IsFixed = true, InputMask = "")]
        gPXUIField(DisplayName = "Import CD")]
        public virtual string ImportCD { get; set; }
        public abstract class importCD : PX.Data.BQL.BqlString.Field<importCD> { }
        #endregion

        #region PostDate
        aPXDBDate()]
        .PXDefault(typeof(AccessInfo.businessDate))]
        rPXUIField(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;
        tPXFilterable]

        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 

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 2
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