I am trying to add the Employees last name to the payroll Possessing screen so I can sort the payments by this field. I have tried to follow some instructions to get this done but can not get my code extension to process. Can someone take a look at it and tell me what I am doing wrong.
using PX.Data.BQL.Fluent;
using PX.Data.EP;
using PX.Data.CR;
using PX.Data.ReferentialIntegrity.Attributes;
using PX.Data;
using PX.Objects.AP;
using PX.Objects.CA;
using PX.Objects.CM;
using PX.Objects.CS;
using PX.Objects.EP;
using PX.Objects.GL;
using PX.Objects.PR;
using PX.Objects.CR;
using PX.Objects;
using System.Collections.Generic;
using System;
namespace PX.Objects.PR
{
public class PRPaymentExt : PXCacheExtension<PX.Objects.PR.PRPayment>
{
#region UsrLastname
[PXDBString(255)]
[PXUIField(DisplayName="Last Name")]
[PXFormula(typeof(Selector<PRPayment.EmployeeID, Contact.bAccountID>))]
[PXSelector(typeof(Search<Contact.bAccountID>),
SubstituteKey = typeof(Contact.LastName)))]
public virtual string UsrLastname { get; set; }
public abstract class usrLastname : PX.Data.BQL.BqlString.Field<usrLastname> { }
#endregion
}
Thanks in advance!
Greg