Skip to main content
Solved

Add Appointment's Customer to title header in recent search history preview.

  • Feb 14, 2023 10:48 AM UTC
  • 4 replies
  • 181 views
  • Translate All

Hello Everyone,


We need to include the Appointment's Customer name in the recently viewed list. We can put the customer's name in Line 1, but we need it in the title header next to the Appointment Nbr.

 

We have added the customer field  on the PXSearchable  Attribute like below but it is not working. Also we have performed rebuild index process on Rebuilt Full-Text Entity Index.

  public class AppointmentEntry_Extension : PXGraphExtension<AppointmentEntry>
{
#region
[PXMergeAttributes(Method = MergeMethod.Append)]
[PXRemoveBaseAttribute(typeof(PX.Data.PXSearchableAttribute))]
[PXSearchable(SM.SearchCategory.FS, "SM {0}: {1} {2}", new Type[] { typeof(FSAppointment.srvOrdType), typeof(FSAppointment.refNbr) , typeof(FSAppointment.customerID) },
new Type[] { typeof(Customer.acctCD), typeof(FSAppointment.docDesc) },
NumberFields = new Type[] { typeof(FSAppointment.refNbr) },
Line1Format = "{0:d}{1}", Line1Fields = new Type[] { typeof(FSAppointment.scheduledDateTimeBegin), typeof(FSAppointment.status) },
Line2Format = "{0}", Line2Fields = new Type[] { typeof(FSAppointment.docDesc) },
MatchWithJoin = typeof(InnerJoin<FSServiceOrder, On<FSServiceOrder.sOID, Equal<FSAppointment.sOID>>, InnerJoin<Customer, On<Customer.bAccountID, Equal<FSServiceOrder.customerID>>>>),
SelectForFastIndexing = typeof(Select2<FSAppointment, InnerJoin<FSServiceOrder, On<FSServiceOrder.sOID, Equal<FSAppointment.sOID>>, InnerJoin<Customer, On<Customer.bAccountID, Equal<FSServiceOrder.customerID>>>>>)
)]
protected void FSAppointment_NoteID_CacheAttached(PXCache sender) { }
#endregion
}

what changes are required to display the customer name in title header?

Best answer by aaghaei

If I am not mistaken, there was another property decoration required to show a DAC field as part of the record title description which is [PXDescription]

View original

4 replies

Forum|alt.badge.img+8
  • Captain II
  • Feb 14, 2023 5:09 PM UTC

It looks correct. Since you’re likely wanting Customer.acctCD and not the customerID I would suggest using Customer.acctCD instead of FSAppointment.customerID to start with.

Then, after publishing, do a rebuild.

If this is a local install, you can review the results of the re-build by examining the SearchIndex table to see if the issue is that the SearchIndex.Content field is not being updated or if the display of the search results is the issue (which might just require a site restart to fix).

Translate

thank you for your response,

I followed all of your instructions, but now neither the title heading nor Line 1 are showing the customer.
Also, the customer was not visible in the database.

Any other suggestions

  public class AppointmentEntry_Extension : PXGraphExtension<AppointmentEntry>
{
#region
[PXMergeAttributes(Method = MergeMethod.Append)]
[PXRemoveBaseAttribute(typeof(PX.Data.PXSearchableAttribute))]
[PXSearchable(SM.SearchCategory.FS, "SM {0}: {1} {2}", new Type[] { typeof(FSAppointment.srvOrdType), typeof(FSAppointment.refNbr), typeof(Customer.acctCD) },
new Type[] { typeof(Customer.acctCD), typeof(FSAppointment.docDesc) },
NumberFields = new Type[] { typeof(FSAppointment.refNbr) },
Line1Format = "{0:d}{1}", Line1Fields = new Type[] { typeof(FSAppointment.scheduledDateTimeBegin), typeof(FSAppointment.status) },
Line2Format = "{0}", Line2Fields = new Type[] { typeof(FSAppointment.docDesc) },
MatchWithJoin = typeof(InnerJoin<FSServiceOrder, On<FSServiceOrder.sOID, Equal<FSAppointment.sOID>>, InnerJoin<Customer, On<Customer.bAccountID, Equal<FSServiceOrder.customerID>>>>),
SelectForFastIndexing = typeof(Select2<FSAppointment, InnerJoin<FSServiceOrder, On<FSServiceOrder.sOID, Equal<FSAppointment.sOID>>, InnerJoin<Customer, On<Customer.bAccountID, Equal<FSServiceOrder.customerID>>>>>)
)]
protected void FSAppointment_NoteID_CacheAttached(PXCache sender) { }
#endregion
}

 

Translate

aaghaei
Captain II
Forum|alt.badge.img+11
  • Captain II
  • Answer
  • Feb 18, 2023 1:34 AM UTC

If I am not mistaken, there was another property decoration required to show a DAC field as part of the record title description which is [PXDescription]

Translate

Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • Mar 20, 2023 9:40 PM UTC

Hi @srikanth56  were you able to find a solution? Thank you!

Translate