Hi Guys, I’m trying to add custom column - contract Price field from service contract and display in run service contract billing screen.
I added the field in Screen editor customization. created the DAC, and graph but I’m not able to view the data in run service contract billing screen.
Below is my custom field.
DAC,
#region UsrContractTotal
PXDBDecimal]
/PXUIField(DisplayName = "Contract Price")]
public virtual decimal? UsrContractTotal { get; set; }
public abstract class usrContractTotal : BqlDecimal.Field<usrContractTotal> { }
#endregion
Graph,
Public class ContractPeriodToPostEntryExt : PXGraphExtension<CreateInvoiceByContractPost>
{
#region Event Handlers
public static bool IsActive() => true;
protected virtual void ContractPeriodToPost_ServiceContractID_FieldSelecting(PXCache cache, PXFieldSelectingEventArgs e, PXFieldSelecting InvokeBaseHandler)
{
if (InvokeBaseHandler != null)
InvokeBaseHandler(cache, e);
var row = (ContractPeriodToPost)e.Row;
if (row != null)
{
PXResultset<FSContractPeriodDet> objservicecont = PXSelectJoin<FSContractPeriodDet,
InnerJoin<FSContractPeriod,
On<FSContractPeriod.serviceContractID, Equal<FSContractPeriodDet.serviceContractID>,
And<FSContractPeriod.contractPeriodID, Equal<FSContractPeriodDet.contractPeriodID>>>>,
Where<FSContractPeriodDet.serviceContractID, Equal<Required<FSServiceContract.serviceContractID>>,
And<FSContractPeriod.status, Equal<FSContractPeriod.status.Active>>>>.Select(Base, row.ServiceContractID);
decimal totalRecSum = 0m;
foreach (var det in objservicecont)
{
totalRecSum += ((FSContractPeriodDet)detr0]).RecurringTotalPrice ?? 0m;
}
row.GetExtension<ContractPeriodToPostKSExt>().UsrContractTotal = totalRecSum;
}
}
}
}
#endregion
When i try to debug, I’m able to get the data in graph but not in the UI. Can anyone check where it is going wrong.
For some reason I was not able to share my customization.