Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
434 views
in Technique[技术] by (71.8m points)

acumatica - Custom field on CROpportunity doesn't display saved value since upgrading from 6.10 or 2017R2 to 2018R1

I made a DAC extension on CROpportunity in my customization project which was working well in 6.10 and 2017R2. Now I upgraded my site to 2018R1 and my custom fields don't work anymore. As soon as I save my record, the customized field goes blank even if the database saved the value correctly.

Why is this happening ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In version 2018R1, PX.Objects.CR.CROpportunity became a projection of PX.Objects.CR.Standalone.CROpportunity.

In order for the projection to get its customized fields values correctly, you need to also customize the Standalone DAC and set the BQL Field of PX.Objects.CR.CROpportunity point to PX.Objects.CR.Standalone.CROpportunity.

Here is an example :

public class CROpportunityExt : PXCacheExtension<PX.Objects.CR.CROpportunity> 
{
    #region UsrTest
    [PXDBDecimal(BqlField = typeof(CROpportunityStandaloneExt.usrTest))]
    [PXUIField(DisplayName="Test Field")]

    public virtual Decimal? UsrTest { get; set; }
    public abstract class usrTest : IBqlField { }
    #endregion
}

public class CROpportunityStandaloneExt : PXCacheExtension<PX.Objects.CR.Standalone.CROpportunity>
{
    #region UsrTest
    [PXDBDecimal]
    [PXUIField(DisplayName="Test Field")]

    public virtual Decimal? UsrTest { get; set; }
    public abstract class usrTest : IBqlField { }
    #endregion
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...