Skip to main content

Good day everyone, 

We have a changed the description field of the OwnerID (standard field) and changed the description field to use our usrCustomName field like this:
 

"PXNonInstantiatedExtension]
public class CR_CROpportunity_ExistingColumn : PXCacheExtension<PX.Objects.CR.CROpportunity>
{
#region OwnerID
PXDBInt]
PXMergeAttributes(Method = MergeMethod.Append)]
PXCustomizeBaseAttribute(typeof(OwnerAttribute), "DescriptionField",
typeof(MAKLBAccountExt.usrCustomName))]
PXSelector(typeof(Search<EPEmployee.defContactID>),
typeof(EPEmployee.acctCD),
typeof(EPEmployee.acctName),
typeof(BAccountExt.usrCustomName))]
public int? OwnerID { get; set; }
#endregion
}

The changes we made is on the CROpportunityExt DAC.

The problem we face now however is that we get an error on the Generic Inquiries

and the DAC Schema also displays this:

 

 

If I unpublish this, it works. 

Has any one ever experienced this and if so, how did you get around this? Is there something I did wrong in the code? 

 

Thanks in advance. 

There are a couple things I would try:

  1. You have the merge method specified as MergeMethod.Append, but you are redefining the selector, which I believe you’d want to replace. I would try MergeMethod.Merge
  2. You’re redefining iPXDBInt], which may be required, since it’s originally rolled into the dOwner] attribute, but you are going to need to define the BQL field that this field is attached to, because CROpportunity is a projection

I would try something like this:

#region OwnerID  
rPXMergeAttributes(Method = MergeMethod.Merge)]
rPXCustomizeBaseAttribute(typeof(OwnerAttribute), "DescriptionField",
typeof(MAKLBAccountExt.usrCustomName))]
mPXDBInt(BqlField = typeof(Standalone.CROpportunityRevision.ownerID))]
IPXSelector(typeof(Search<EPEmployee.defContactID>),
typeof(EPEmployee.acctCD),
typeof(EPEmployee.acctName),
typeof(BAccountExt.usrCustomName))]
public int? OwnerID { get; set; }
#endregion

 


Reply