Skip to main content
Solved

Problem with copy past action

  • June 3, 2026
  • 0 replies
  • 28 views

Forum|alt.badge.img+2

I have my custom form.
DAC:
 

[Serializable]
[PXCacheName(Messages.CustomerStandingPOs)]
[PXPrimaryGraph(typeof(ABCustomerPOsMaint))]
public class ABCustomerPOs : PXBqlTable, IBqlTable
{
    #region CustomerID
    public abstract class customerID : PX.Data.BQL.BqlInt.Field<customerID> { }
    [CustomerActive(Visibility = PXUIVisibility.SelectorVisible, DescriptionField = typeof(Customer.acctName), Filterable = true, Required = true)]
    [PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
    public virtual Int32? CustomerID { get; set; }
    #endregion

    #region EffectiveDate
    public abstract class effectiveDate : PX.Data.BQL.BqlDateTime.Field<effectiveDate> { }

    [PXDBDate]
    [PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
    [PXUIField(DisplayName = Messages.EffectiveDate, Required = true, Visibility = PXUIVisibility.SelectorVisible)]
    public virtual DateTime? EffectiveDate { get; set; }
    #endregion

    #region ExpiryDate
    public abstract class expiryDate : PX.Data.BQL.BqlDateTime.Field<expiryDate> { }

    [PXDBDate]
    [PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
    [PXUIField(DisplayName = Messages.ExpiryDate, Required = true, Visibility = PXUIVisibility.SelectorVisible)]
    public virtual DateTime? ExpiryDate { get; set; }
    #endregion

    #region LocationID
    public abstract class locationID : PX.Data.BQL.BqlInt.Field<locationID> { }

    [LocationActive(typeof(Where<Location.bAccountID, Equal<Optional<customerID>>,
        And<MatchWithBranch<Location.cBranchID>>>), DescriptionField = typeof(Location.descr), Visibility = PXUIVisibility.SelectorVisible, Required = false)]
    [PXDefault(typeof(Coalesce<
        Search2<BAccountR.defLocationID,
        InnerJoin<PX.Objects.CR.Standalone.Location, On<PX.Objects.CR.Standalone.Location.bAccountID, Equal<BAccountR.bAccountID>, And<PX.Objects.CR.Standalone.Location.locationID, Equal<BAccountR.defLocationID>>>>,
        Where<BAccountR.bAccountID, Equal<Current<customerID>>,
            And<PX.Objects.CR.Standalone.Location.isActive, Equal<True>, And<MatchWithBranch<PX.Objects.CR.Standalone.Location.cBranchID>>>>>,
        Search<PX.Objects.CR.Standalone.Location.locationID,
        Where<PX.Objects.CR.Standalone.Location.bAccountID, Equal<Current<customerID>>,
        And<PX.Objects.CR.Standalone.Location.isActive, Equal<True>, And<MatchWithBranch<PX.Objects.CR.Standalone.Location.cBranchID>>>>>>), PersistingCheck = PXPersistingCheck.Nothing)]
    [PXForeignReference(
        typeof(CompositeKey<
            Field<customerID>.IsRelatedTo<Location.bAccountID>,
            Field<locationID>.IsRelatedTo<Location.locationID>
        >))]
    public virtual Int32? LocationID { get; set; }
    #endregion

    #region ServiceType
    public abstract class serviceType : PX.Data.BQL.BqlString.Field<serviceType> { }

    [PXDBString(255, IsUnicode = true)]
    [PXSelectorFromComboAttribute(ConstSERVTYPE.SERVTYPE)]
    [PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
    [PXUIField(DisplayName = Messages.ServiceType)]     
    public virtual string ServiceType { get; set; }
    #endregion

    #region SubmissionNbr
    public abstract class submissionNbr : PX.Data.BQL.BqlString.Field<submissionNbr> { }

    [PXDBString(60)]
    [PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
    [PXUIField(DisplayName = Messages.SubmissionNbr)]
    public virtual string SubmissionNbr { get; set; }
    #endregion

    #region CustomerPO
    public abstract class customerPO : PX.Data.BQL.BqlString.Field<customerPO> { }

    [PXDBString(60)]
    [PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
    [PXUIField(DisplayName = Messages.CustomerPO, Required = true)]
    public virtual string CustomerPO { get; set; }
    #endregion

    #region tstamp
    public abstract class Tstamp : PX.Data.BQL.BqlByteArray.Field<Tstamp> { }
    protected Byte[] _tstamp;
    [PXDBTimestamp()]
    public virtual Byte[] tstamp
    {
        get
        {
            return this._tstamp;
        }
        set
        {
            this._tstamp = value;
        }
    }
    #endregion

    #region NoteID
    public abstract class noteID : PX.Data.BQL.BqlGuid.Field<noteID> { }
    protected Guid? _NoteID;
    [PXNote(IsKey = true)]
    public virtual Guid? NoteID
    {
        get
        {
            return this._NoteID;
        }
        set
        {
            this._NoteID = value;
        }
    }
    #endregion

    #region CreatedByID
    public abstract class createdByID : PX.Data.BQL.BqlGuid.Field<createdByID> { }
    protected Guid? _CreatedByID;
    [PXDBCreatedByID()]
    public virtual Guid? CreatedByID
    {
        get
        {
            return this._CreatedByID;
        }
        set
        {
            this._CreatedByID = value;
        }
    }
    #endregion

    #region CreatedByScreenID
    public abstract class createdByScreenID : PX.Data.BQL.BqlString.Field<createdByScreenID> { }
    protected String _CreatedByScreenID;
    [PXDBCreatedByScreenID()]
    public virtual String CreatedByScreenID
    {
        get
        {
            return this._CreatedByScreenID;
        }
        set
        {
            this._CreatedByScreenID = value;
        }
    }
    #endregion

    #region CreatedDateTime
    public abstract class createdDateTime : PX.Data.BQL.BqlDateTime.Field<createdDateTime> { }
    protected DateTime? _CreatedDateTime;
    [PXDBCreatedDateTime()]
    [PXUIField(DisplayName = PXDBLastModifiedByIDAttribute.DisplayFieldNames.CreatedDateTime, Enabled = false, IsReadOnly = true)]
    public virtual DateTime? CreatedDateTime
    {
        get
        {
            return this._CreatedDateTime;
        }
        set
        {
            this._CreatedDateTime = value;
        }
    }
    #endregion

    #region LastModifiedByID
    public abstract class lastModifiedByID : PX.Data.BQL.BqlGuid.Field<lastModifiedByID> { }
    protected Guid? _LastModifiedByID;
    [PXDBLastModifiedByID()]
    public virtual Guid? LastModifiedByID
    {
        get
        {
            return this._LastModifiedByID;
        }
        set
        {
            this._LastModifiedByID = value;
        }
    }
    #endregion

    #region LastModifiedByScreenID
    public abstract class lastModifiedByScreenID : PX.Data.BQL.BqlString.Field<lastModifiedByScreenID> { }
    protected String _LastModifiedByScreenID;
    [PXDBLastModifiedByScreenID()]
    public virtual String LastModifiedByScreenID
    {
        get
        {
            return this._LastModifiedByScreenID;
        }
        set
        {
            this._LastModifiedByScreenID = value;
        }
    }
    #endregion

    #region LastModifiedDateTime
    public abstract class lastModifiedDateTime : PX.Data.BQL.BqlDateTime.Field<lastModifiedDateTime> { }
    protected DateTime? _LastModifiedDateTime;
    [PXDBLastModifiedDateTime()]
    [PXUIField(DisplayName = PXDBLastModifiedByIDAttribute.DisplayFieldNames.LastModifiedDateTime, Enabled = false, IsReadOnly = true)]
    public virtual DateTime? LastModifiedDateTime
    {
        get
        {
            return this._LastModifiedDateTime;
        }
        set
        {
            this._LastModifiedDateTime = value;
        }
    }
    #endregion
}

Graph
 public class ABCustomerPOsMaint : PXGraph<ABCustomerPOsMaint, ABCustomerPOs>
 {
     #region Selects
     public PXSelect<ABCustomerPOs> CustomerPOs;
     #endregion

}

When I press copy and past any field not populated:(

Best answer by hdussa

Hello ​@bihalivan15 ,

I noticed the key is currently defined on the NoteID field. I'd recommend removing that and switching to a conventional primary key instead.

hdussa
Jr Varsity I
Forum|alt.badge.img+2
  • Jr Varsity I
  • Answer
  • June 3, 2026

Hello ​@bihalivan15 ,

I noticed the key is currently defined on the NoteID field. I'd recommend removing that and switching to a conventional primary key instead.