The customer requires çustomization on Acumatica to add the invoice reference number to the Grid of 'Run Recognition' graph the data view is Items. I have added the column to the grid and defined the delegate to the custom data view : However the Ref. Nbr is not being populated, can someone assist with regards to binding a new data view to an existing grid? This is my code extension.
namespace PX.Objects.DR
{
public class ScheduledTranExt : PXCacheExtension<PX.Objects.DR.DRRecognition.ScheduledTran>
{
#region UsrRefNbr
[PXString]
[PXUIField(DisplayName = "Ref. Nbr.")]
public virtual string UsrRefNbr { get; set; }
public abstract class usrRefNbr : IBqlField { }
#endregion
}
public class DRRecognitionPXExt : PXGraphExtension<DRRecognition>
{
#region Event Handlers
public PXFilteredProcessing<DRRecognition.ScheduledTran,DRRecognition.ScheduleRecognitionFilter> ItemsCustom;
public PXSelectJoin<ARInvoice,
InnerJoin<DRSchedule, On<DRSchedule.docType, Equal<ARInvoice.docType>,
And<DRSchedule.refNbr, Equal<ARInvoice.refNbr>>>>,
Where<DRSchedule.scheduleNbr, Equal<Required<DRSchedule.scheduleNbr>>>> Invoices;
protected
virtual IEnumerable itemsCustom()
{
foreach (DRRecognition.ScheduledTran result
in Base.Items.Select())
{
ARInvoice invoice = Invoices.Select(result.ScheduleNbr);
var cache = Base.Caches[typeof(DRRecognition.ScheduledTran)];
var tranExt = cache.GetExtension<ScheduledTranExt>(result);
tranExt.UsrRefNbr = invoice.RefNbr;`enter code here`
cache.Update(result);
yield return result;
}
}
#endregion
}
}
