Solved

Table with the custom DAC alias cannot be found in generic inquiry

  • 9 November 2021
  • 4 replies
  • 35 views

Userlevel 3
Badge +1

I’ve created a custom SQL table and DAC, but having difficulty using the new class in a GI.  

This is the error when referencing any of the fields:

Also, when trying to specify the new GI on the navigation tab of a different generic inquiry the [Item] parameter is not available as a filter, and none of the fields appear in the dropdown either.

The custom DAC is available to select on the Tables tab of the Generic Inquiry, and the Alias seems to match:

 

The GI runs and filters correctly, but we would like to use it as a side panel on another GI and that won’t work because the navigation parameter isn’t available.  I have tried republishing the customization and restarting the application several times.

The GI returns data when run on its own:

 

DAC Definition:

using System;

using PX.Data;

namespace SalesHistory

{

  [System.SerializableAttribute()]

  [PXCacheName("OE Sales History")]

  public class PS_Sales_History : IBqlTable

  {

    #region Id

    [PXDBIdentity(IsKey = true)]

    public virtual int? Id { get; set; }

    public abstract class id : PX.Data.BQL.BqlInt.Field<id> { }

    #endregion

    #region Ord_type

    [PXDBString(1, IsFixed = true, InputMask = "")]

    [PXUIField(DisplayName = "Ord_type")]

    public virtual string Ord_type { get; set; }

    public abstract class ord_type : PX.Data.BQL.BqlString.Field<ord_type> { }

    #endregion

    #region Ord_no

    [PXDBString(8, IsFixed = true, InputMask = "")]

    [PXUIField(DisplayName = "Ord_no")]

    public virtual string Ord_no { get; set; }

    public abstract class ord_no : PX.Data.BQL.BqlString.Field<ord_no> { }

    #endregion

    #region Item

    [PXDBString(30, IsUnicode = true, InputMask = "")]

    [PXUIField(DisplayName = "Item")]

    public virtual string Item { get; set; }

    public abstract class item : PX.Data.BQL.BqlString.Field<item> { }

    #endregion

    #region CustNo

    [PXDBString(30, IsUnicode = true, InputMask = "")]

    [PXUIField(DisplayName = "Cust No")]

    public virtual string CustNo { get; set; }

    public abstract class custNo : PX.Data.BQL.BqlString.Field<custNo> { }

    #endregion

    #region Unit_Price

    [PXDBDecimal()]

    [PXUIField(DisplayName = "Unit_ Price")]

    public virtual Decimal? Unit_Price { get; set; }

    public abstract class unit_Price : PX.Data.BQL.BqlDecimal.Field<unit_Price> { }

    #endregion

    #region Unit_Cost

    [PXDBDecimal()]

    [PXUIField(DisplayName = "Unit_ Cost")]

    public virtual Decimal? Unit_Cost { get; set; }

    public abstract class unit_Cost : PX.Data.BQL.BqlDecimal.Field<unit_Cost> { }

    #endregion

    #region Qty

    [PXDBDecimal()]

    [PXUIField(DisplayName = "Qty")]

    public virtual Decimal? Qty { get; set; }

    public abstract class qty : PX.Data.BQL.BqlDecimal.Field<qty> { }

    #endregion

    #region Noteid

    [PXNote()]

    public virtual Guid? Noteid { get; set; }

    public abstract class noteid : PX.Data.BQL.BqlGuid.Field<noteid> { }

    #endregion

    #region CreatedByID

    [PXDBCreatedByID()]

    public virtual Guid? CreatedByID { get; set; }

    public abstract class createdByID : PX.Data.BQL.BqlGuid.Field<createdByID> { }

    #endregion

    #region CreatedByScreenID

    [PXDBCreatedByScreenID()]

    public virtual string CreatedByScreenID { get; set; }

    public abstract class createdByScreenID : PX.Data.BQL.BqlString.Field<createdByScreenID> { }

    #endregion

    #region CreatedDateTime

    [PXDBCreatedDateTime()]

    public virtual DateTime? CreatedDateTime { get; set; }

    public abstract class createdDateTime : PX.Data.BQL.BqlDateTime.Field<createdDateTime> { }

    #endregion

    #region LastModifiedByID

    [PXDBLastModifiedByID()]

    public virtual Guid? LastModifiedByID { get; set; }

    public abstract class lastModifiedByID : PX.Data.BQL.BqlGuid.Field<lastModifiedByID> { }

    #endregion

    #region LastModifiedByScreenID

    [PXDBLastModifiedByScreenID()]

    public virtual string LastModifiedByScreenID { get; set; }

    public abstract class lastModifiedByScreenID : PX.Data.BQL.BqlString.Field<lastModifiedByScreenID> { }

    #endregion

    #region LastModifiedDateTime

    [PXDBLastModifiedDateTime()]

    public virtual DateTime? LastModifiedDateTime { get; set; }

    public abstract class lastModifiedDateTime : PX.Data.BQL.BqlDateTime.Field<lastModifiedDateTime> { }

    #endregion

    #region Tstamp

    [PXDBTimestamp()]

    [PXUIField(DisplayName = "Tstamp")]

    public virtual byte[] Tstamp { get; set; }

    public abstract class tstamp : PX.Data.BQL.BqlByteArray.Field<tstamp> { }

    #endregion

  }

}

Can any customization gurus out there see what might be wrong here, or set me on the right course on how to troubleshoot this?

Thanks in advance!

Laura

icon

Best answer by lauraj46 10 November 2021, 13:52

View original

4 replies

Userlevel 7
Badge +10

Hi @lauraj46  Can you please also share the SQL custom table creation script for this DAC, so that it will be helpful to review from my end ?

Userlevel 3
Badge +1

Hi @Naveen B ,

I’ve attached the SQL script.  Thanks for looking!

Laura

Userlevel 3
Badge +1

Hi @Naveen - I looked at this with fresh eyes today and it seems that the problem is with the underscores in the DAC.  I removed the underscores and it’s working :grinning: !

Userlevel 7
Badge +10

Hi @lauraj46  Exactly, that is what I would like to update here.

For the Default Acumatica, none of the SQL tables will have the Underscores. :) 

Glad to know that you don’t have any issue with this GI.

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 — 2020  Acumatica, Inc. All rights reserved