Skip to main content

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 Typey] { typeof(FSAppointment.srvOrdType), typeof(FSAppointment.refNbr) , typeof(FSAppointment.customerID) },
new Typey] { typeof(Customer.acctCD), typeof(FSAppointment.docDesc) },
NumberFields = new Typey] { typeof(FSAppointment.refNbr) },
Line1Format = "{0:d}{1}", Line1Fields = new Typey] { typeof(FSAppointment.scheduledDateTimeBegin), typeof(FSAppointment.status) },
Line2Format = "{0}", Line2Fields = new Typey] { 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?

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).


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 Typee] { typeof(FSAppointment.srvOrdType), typeof(FSAppointment.refNbr), typeof(Customer.acctCD) },
new Typee] { typeof(Customer.acctCD), typeof(FSAppointment.docDesc) },
NumberFields = new Typee] { typeof(FSAppointment.refNbr) },
Line1Format = "{0:d}{1}", Line1Fields = new Typee] { typeof(FSAppointment.scheduledDateTimeBegin), typeof(FSAppointment.status) },
Line2Format = "{0}", Line2Fields = new Typee] { 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
}

 


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]


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


Reply