Skip to main content
Solved

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

  • February 14, 2023
  • 4 replies
  • 122 views

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
Did this topic help you find an answer to your question?

4 replies

Forum|alt.badge.img+6
  • Captain II
  • 576 replies
  • February 14, 2023

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


  • Author
  • Freshman I
  • 8 replies
  • February 16, 2023

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
        }

 


aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 1205 replies
  • Answer
  • February 18, 2023

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]


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2782 replies
  • March 20, 2023

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings