I have been asked to add a new tab that displays a list of items linked to a project quote on the Project Quote Screen (PM304500). I need some help in how to tackle this, since I am struggling to identify the graph (or DAC) I need to extend to be able to add my custom view.
This is my DAC of the items I want to display on the new tab, which still needs to be worked on.
using System;
using PX.Data;
namespace *******
{
[Serializable]
[PXCacheName("BOQUMaster")]
public class BOQUMaster : IBqlTable
{
#region MasterID
[PXDBIdentity(IsKey = true)]
public virtual int? MasterID { get; set; }
public abstract class masterID : PX.Data.BQL.BqlInt.Field<masterID> { }
#endregion
#region MasterCD
[PXDBString(20, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Master CD")]
public virtual string MasterCD { get; set; }
public abstract class masterCD : PX.Data.BQL.BqlString.Field<masterCD> { }
#endregion
#region Description
[PXDBString(100, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Description")]
public virtual string Description { get; set; }
public abstract class description : PX.Data.BQL.BqlString.Field<description> { }
#endregion
#region MasterOnProjectStatus
[PXDBString(20, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Master On Project Status")]
public virtual string MasterOnProjectStatus { get; set; }
public abstract class masterOnProjectStatus : PX.Data.BQL.BqlString.Field<masterOnProjectStatus> { }
#endregion
#region DefaultInstallRatio
[PXDBDecimal()]
[PXUIField(DisplayName = "Default Install Ratio")]
public virtual Decimal? DefaultInstallRatio { get; set; }
public abstract class defaultInstallRatio : PX.Data.BQL.BqlDecimal.Field<defaultInstallRatio> { }
#endregion
#region ContractID
[PXDBInt()]
[PXUIField(DisplayName = "Contract ID")]
public virtual int? ContractID { get; set; }
public abstract class contractID : PX.Data.BQL.BqlInt.Field<contractID> { }
#endregion
#region QuoteID
[PXDBGuid()]
[PXUIField(DisplayName = "Quote ID")]
public virtual Guid? QuoteID { get; set; }
public abstract class quoteID : PX.Data.BQL.BqlGuid.Field<quoteID> { }
#endregion
#region Tstamp
[PXDBTimestamp()]
[PXUIField(DisplayName = "Tstamp")]
public virtual byte[] Tstamp { get; set; }
public abstract class tstamp : PX.Data.BQL.BqlByteArray.Field<tstamp> { }
#endregion
#region CreatedByID
[PXDBCreatedByID()]
public virtual Guid? CreatedByID { get; set; }
public abstract class createdByID : PX.Data.BQL.BqlGuid.Field<createdByID> { }
#endregion
#region CreatedByScreenID
[PXDBCreatedByScreenID()]
public virtual string CreatedByScreenID { get; set; }
public abstract class createdByScreenID : PX.Data.BQL.BqlString.Field<createdByScreenID> { }
#endregion
#region CreatedDateTime
[PXDBCreatedDateTime()]
public virtual DateTime? CreatedDateTime { get; set; }
public abstract class createdDateTime : PX.Data.BQL.BqlDateTime.Field<createdDateTime> { }
#endregion
#region LastModifiedByID
[PXDBLastModifiedByID()]
public virtual Guid? LastModifiedByID { get; set; }
public abstract class lastModifiedByID : PX.Data.BQL.BqlGuid.Field<lastModifiedByID> { }
#endregion
#region LastModifiedByScreenID
[PXDBLastModifiedByScreenID()]
public virtual string LastModifiedByScreenID { get; set; }
public abstract class lastModifiedByScreenID : PX.Data.BQL.BqlString.Field<lastModifiedByScreenID> { }
#endregion
#region LastModifiedDateTime
[PXDBLastModifiedDateTime()]
public virtual DateTime? LastModifiedDateTime { get; set; }
public abstract class lastModifiedDateTime : PX.Data.BQL.BqlDateTime.Field<lastModifiedDateTime> { }
#endregion
#region Noteid
[PXNote()]
public virtual Guid? Noteid { get; set; }
public abstract class noteid : PX.Data.BQL.BqlGuid.Field<noteid> { }
#endregion
}
}
The view I want will look something like this, but obviously I need to modify the graph I am extending
using PX.Data.BQL.Fluent;
using PX.Objects.CR;
using PX.Objects.PM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace *******
{
//What graph do I need to extend here or do I need to think about another approach?
public class PMQuoteMaint_Extension : PXGraphExtension<PMQuoteMaint>
{
// The data view I will need to add to the extend class will look something like this
//public SelectFrom<BOQUMaster>.Where<BOQUMaster.quoteID.IsEqual<PMQuoteMaint.quoteID.FromCurrent>>.View BillOfQuantities;
}
}
Please feel free to add any helpful articles or links in the comments.