如何在项目报价屏幕上添加字段 PQ000025 [英] how to add a field on the Project Quotes screen PQ000025

查看:7
本文介绍了如何在项目报价屏幕上添加字段 PQ000025的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,我想在此屏幕项目报价中添加一个新字段,但这样做时我收到此消息,该表不存在.应该如何或如何实现它.

提前致谢

Good morning, I want to add a new field on this screen Project Quotes but in doing so I get this message, that the table does not exist. How should or what is the way to achieve it.

Thanks in advance

Imagen 01

The added field in the database

enter image description here

He added the field in the database and then I generated my extension.

namespace PX.Objects.CR
{
    public class PMQuoteExt : PXCacheExtension<PX.Objects.CR.CRQuote>
    {
        #region UsrNota
        [PXDBString(-1, InputMask = "", BqlField = typeof(PMQuoteStandaloneExt.usrNotaText))]

        [PXUIField(DisplayName = "Nota ")]

        public virtual string UsrNotaText { get; set; }
        public abstract class usrNotaText : IBqlField { }
        #endregion
    }

    public class PMQuoteStandaloneExt : PXCacheExtension<PX.Objects.CR.Standalone.CRQuote>
    {
        #region UsrNota
        [PXDBString(-1, InputMask = "")]
        [PXUIField(DisplayName = "Nota ")]

        public virtual string UsrNotaText { get; set; }
        public abstract class usrNotaText : IBqlField { }
        #endregion
    }
}




    public class PMQuoteMaint_Extension : PXGraphExtension<PMQuoteMaint>
    {           
        public PXSelect<PX.Objects.CR.Standalone.CRQuote> Test;            

    }

However, when I record, it does not fill the field.

that I am making a mistake or doing wrong. Can you tell me please.

Thank you

解决方案

PMQuote is not an actual DB table, but a BQL projection between tables:

  • CR.Standalone.CRQuote
  • CROpportunityRevision
  • CR.Standalone.CROpportunity

The way that I would tackle this is:

  1. Add the field in table CRQuote
  2. Extend the graph and override the Projection with the inclusion of the new CRQuote field.

UPDATE: Based on @HB_Acumatica suggestion, step 2 would get simplified to a DAC extension (no need for the Graph extension). Much simpler to maintain in subsequent Acumatica versions!

UPDATE 2:

The extended DACs do not look correct in your question. Keep in mind that you should extend the original table (CRQuote), and the projection in order to have the value persisted. The following definition worked correctly on my end:

//Projection extension
  public class PMQuoteExt : PXCacheExtension<PMQuote>
  {
    #region UsrCustomField
    [PXDBString(100, BqlField = typeof(CRQuoteExt.usrCustomField))]
    [PXUIField(DisplayName="Custom Field")]
    public virtual string UsrCustomField { get; set; }
    public abstract class usrCustomField : IBqlField { }
    #endregion
  }
//Actual Table extension     
public class CRQuoteExt : PXCacheExtension<PX.Objects.CR.Standalone.CRQuote>
{
    #region UsrCustomField
    [PXDBString(100)]
    [PXUIField(DisplayName="Custom Field")]
    public virtual string UsrCustomField { get; set; }
    public abstract class usrCustomField : IBqlField { }
    #endregion

}

这篇关于如何在项目报价屏幕上添加字段 PQ000025的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆