AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Everything Else
Custom date field i...
 
Notifications
Clear all

Questions Custom date field in opportunity screen not displaying data

 
Everything Else
Last Post by Tim Rodman 6 years ago
3 Posts
2 Users
0 Reactions
3,546 Views
RSS
KDYoung
Posts: 26
 KDYoung
Topic starter
July 24, 2019 5:08 pm
(@kdyoung)
Eminent Member
Joined: 6 years ago

I created a custom date field in the opportunity screen. The field shows up just as expected. I enter a date save the record, go out, go back in and the date is no longer there. However, when I query  the database, the column is there and there is a date in the column.  So, even though the date is being stored in the database it is not displaying it in the screen or when I added that value to the generic inquiry it is also blank. I am not a programmer but it seems like that should’ve been an easy thing to do. I found some references on the web of this type of problem but was hoping there was a more straightforward fix than what those appeared, as they were more programming than I am comfortable  at this point.

I am running fairly recent version of 2019R1. 

Any help would be appreciated!

I apologize if this should’ve been in a different section of the forum. 


2 Replies
KDYoung
Posts: 26
 KDYoung
Topic starter
July 25, 2019 10:30 pm
(@kdyoung)
Eminent Member
Joined: 6 years ago

Response from an Acumatica support person.. Evidently they changed some things with 2018R1. See comments/answers below from support. After making this change the custom field worked as desired.  Image of where in the customization tools I had to also add this custom field to is below.


After reviewing it into more details, it sounds that it could be related to the new implementation of PXProjection on that DAC.

Unlike ver. 2017 R2, some DAC like the PX.Objects.CR.CROpportunity DAC were implemented as a regular Data Access Class:

[System.SerializableAttribute()]
[PXCacheName(Messages.Opportunity)]
[PXPrimaryGraph(typeof(OpportunityMaint))]
[CREmailContactsView(typeof(Select2<Contact,
    LeftJoin<BAccount, On<BAccount.bAccountID, Equal>>,
    Where2<Where<Optional, IsNull, And<Contact.contactID, Equal<Optional>>>,
            Or2<Where<Optional, IsNotNull, And<Contact.bAccountID, Equal<Optional>>>,
            Or<Contact.contactType, Equal>>>>))]
[PXEMailSource]//NOTE: for assignment map
public partial class CROpportunity : PX.Data.IBqlTable, IAssign, IPXSelectable
{
    ...
}

In version 2018 R1(and later) the PX.Objects.CR.CROpportunity DAC is a projection over the PX.Objects.CR.Standalone.CROpportunity and PX.Objects.CR.Standalone.CROpportunityRevision DACs:

[System.SerializableAttribute()]
[PXCacheName(Messages.Opportunity)]
[PXPrimaryGraph(typeof(OpportunityMaint))]
[CREmailContactsView(typeof(Select2<Contact,
    LeftJoin<BAccount, On<BAccount.bAccountID, Equal>>,
    Where2<Where<Optional, IsNull, And<Contact.contactID, Equal<Optional>>>,
            Or2<Where<Optional, IsNotNull, And<Contact.bAccountID, Equal<Optional>>>,
            Or<Contact.contactType, Equal>>>>))]
[PXEMailSource]//NOTE: for assignment map
[PXProjection(typeof(Select2<Standalone.CROpportunity,
    InnerJoin<Standalone.CROpportunityRevision,
        On<Standalone.CROpportunityRevision.opportunityID, Equal,
        And<Standalone.CROpportunityRevision.revisionID, Equal>>>>), Persistent = true)]
public partial class CROpportunity : IBqlTable, IAssign, IPXSelectable
{
    ...
}

Because of that change, it's now required to declare 2 extension classes, one for Standalone.CROpportunity (normal DAC) and the CROpportunity  (PXProjection).

On the PXProjection DAC Extension, please remind to add BqlField to the correspondent field on the Standalone DAC, Ex.:  BqlField = typeof(CROpportunityStandaloneExt.usrTest)
public class CROpportunityExt : PXCacheExtension 
{
    #region UsrTest
    [PXDBDecimal(BqlField = typeof(CROpportunityStandaloneExt.usrTest))]
    [PXUIField(DisplayName="Test Field")]

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

Please find more information on this article below:

https://stackoverflow.com/questions/50880116/custom-field-on-cropportunity-doesnt-display-saved-value-since-upgrading-from-6


Reply
Tim Rodman
Posts: 3195
 Tim Rodman
Admin
August 4, 2019 5:48 pm
(@timrodman)
Famed Member
Joined: 10 years ago

Thanks for sharing the solution Kevin!


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 30 Online
  • 2,411 Members
Our newest member: thollings
Latest Post: Generic inquiry with information from Audit history(CT301000)
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

  • James Taylor
Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×