0
我修改了LeadExtension以添加ownerid,以便銷售人員在電子郵件地址的全局搜索期間知道誰是潛在客戶。但是,我只能讓它報告一個數字而不是描述的ID。有一個簡單的方法來修改以下使用typeof報告的員工,而不是ID號的實際名稱(Contact.ownerID):如何在通用搜索中檢索OwnerID中的所有者描述
//modify leads search to report ownerid
public class LeadExtension : PXCacheExtension<Contact>
{
[PXRemoveBaseAttribute(typeof(PXSearchableAttribute))]
[PXMergeAttributes(Method = MergeMethod.Append)]
[PXSearchable(SearchCategory.CR, "{0} {1}", new Type[] { typeof(Contact.contactType), typeof(Contact.displayName) },
new Type[] { typeof(Contact.eMail), typeof(Contact.phone1), typeof(Contact.phone2), typeof(Contact.phone3), typeof(Contact.webSite) },
WhereConstraint = typeof(Where<Current<Contact.contactType>, NotEqual<ContactTypesAttribute.bAccountProperty>, And<Current<Contact.contactType>, NotEqual<ContactTypesAttribute.employee>>>),
Line1Format = "{0}{1}{2}{3}", Line1Fields = new Type[] { typeof(Contact.salutation), typeof(Contact.phone1), typeof(Contact.eMail), typeof(Contact.ownerID) },
Line2Format = "{1}{2}{3}", Line2Fields = new Type[] { typeof(Contact.defAddressID), typeof(Address.displayName), typeof(Address.city), typeof(Address.state), typeof(Address.countryID) }
)]
public Guid? NoteID { get; set; }
}
偉大工程的感謝! – AcumaticaGuy