有关DAC上的三个主键的问题

时间:2019-05-14 03:15:55

标签: acumatica

就我而言,我有三个主键,

主键2基于主键1,

主键3基于主键1和2

我的问题是您如何取消主键DAC字段的值? 如果我在主键1上选择,我将尝试工作,而主键2和3将未设置。我尝试过cache.SetValueExt<DAC.Field>(data,null);还是没有运气。

#region FundType
[PXDBString(3, IsKey = true, IsFixed = true, IsUnicode = true, InputMask = "")]
[RMPCFCustodianSetup.FundTypeList]
[PXDefault(RMPCFCustodianSetup.PCFDocType.PCF)]
[PXUIField(DisplayName = "Fund Type", Required =true)]
public virtual string FundType { get; set; }
public abstract class fundType : IBqlField { }
#endregion

#region ReqPayClassID
[PXDBString(10, IsKey = true, IsUnicode = true, InputMask = "")]
[PXSelector(typeof(Search<RMPCFSetup.classID,
            Where<RMPCFSetup.fundType, Equal<RMPCFRegister.fundType>>>),
        typeof(RMPCFRegister.reqPayClassID),
        typeof(RMPCFRegister.descr),
DescriptionField = typeof(RMPCFSetup.descr),
Filterable = true
)]
[PXForeignReference(typeof(Field<reqPayClassID>.IsRelatedTo<RMPCFSetup.classID>))]
[PXUIField(DisplayName = "Request Class", Required =true)]
public virtual string ReqPayClassID { get; set; }
public abstract class reqPayClassID : IBqlField { }
#endregion

#region RefNbr
[PXDBString(15, IsKey = true, IsUnicode = true, InputMask = "")]
[PXSelector(typeof(Search<RMPCFRegister.refNbr,
    Where<RMPCFRegister.fundType,Equal<Optional2<RMPCFRegister.fundType>>,
        And<RMPCFRegister.reqPayClassID,Equal<Optional2<RMPCFRegister.reqPayClassID>>>>>),
        typeof(RMPCFRegister.fundType),
        typeof(RMPCFRegister.reqPayClassID),
        typeof(RMPCFRegister.refNbr),
        typeof(RMPCFRegister.extRefNbr),
        typeof(RMPCFRegister.descr),
        typeof(RMPCFRegister.docAmt),
        typeof(RMPCFRegister.dateRequested),
        typeof(RMPCFRegister.docStatus)
)]
[PXUIField(DisplayName = "Ref Nbr",Required =true)]
[AutoNumber(typeof(Search<RMPCFSetup.classNumberingID, 
    Where<RMPCFSetup.fundType, Equal<Optional2<RMPCFRegister.fundType>>,
        And<RMPCFSetup.classID,Equal<Optional2<RMPCFRegister.reqPayClassID>>>>>),
        typeof(AccessInfo.businessDate))]
    public virtual string RefNbr { get; set; }
public abstract class refNbr : IBqlField { }
#endregion`

0 个答案:

没有答案