Skip to main content
Solved

Appointment Summary (FS400100) is sorting by Asec instead of Desc


I am working on a customization that will change the appointments summary (FS400100) page ordering to descending instead of ascending which it is currently (this build is 23.108).  While i was working on this issue, I realized that it is sorting in descending order on Build 23.111.0019. This does not make sense as the business logic is identical. I also unpublished all the builds on both instances to make sure that a different customization wast the causing this.

 

Was this fixed in the new build? or am i missing something.

 

Thank you

Best answer by MarcoL45

@RohitRattan88 

After investigating I couldn't find anything. What I ended up doing was overriding initialize() in the AppointmentInq_Extension.

 public class AppointmentInq_Extension : PXGraphExtension<PX.Objects.FS.AppointmentInq>
  {

    public static bool IsActive() => true;


        public override void Initialize()
        {
            base.Initialize();
               Base.Appointments.OrderByNew<OrderBy<Desc<FSAppointmentFSServiceOrder.scheduledDateTimeBegin>>>();
        }

  }

 

View original
Did this topic help you find an answer to your question?

6 replies

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @MarcoL45, Can you please share more details/customization using which we could reproduce the issue?


  • Author
  • Freshman II
  • 9 replies
  • October 16, 2023

Thank you for the reply!

 

All customization are turned off. Here is the problem I am having. Notice the “Scheduled Start Date” is Desc order on build 23.111.0019 but is ASC on build 23.1080020. The buisness logic is the same on both insistence

Build 23.111.0019

Appointment Summary (FS400100)

 

Business Logic

[PXFilterable]
        public PXSelectJoinGroupBy<FSAppointmentFSServiceOrder,
                LeftJoin<FSAppointmentEmployee, On<FSAppointmentEmployee.appointmentID, Equal<FSAppointmentFSServiceOrder.appointmentID>>,
                LeftJoin<FSAppointmentResource, On<FSAppointmentResource.appointmentID, Equal<FSAppointmentFSServiceOrder.appointmentID>>,
                LeftJoin<FSCustomerBillingSetup, On<FSCustomerBillingSetup.cBID, Equal<FSAppointmentFSServiceOrder.cBID>>,
                LeftJoin<FSGeoZonePostalCode, On<FSGeoZonePostalCode.postalCode, Equal<FSAppointmentFSServiceOrder.postalCode>>,
                LeftJoinSingleTable<Customer, On<Customer.bAccountID, Equal<FSAppointmentFSServiceOrder.customerID>>>>>>>,
                Where2<
                   Where<
                       Current<AppointmentInqFilter.branchID>, IsNull,
                       Or<Current<AppointmentInqFilter.branchID>, Equal<FSAppointmentFSServiceOrder.branchID>>>,
                   And2<
                       Where<
                           Current<AppointmentInqFilter.branchLocationID>, IsNull,
                           Or<Current<AppointmentInqFilter.branchLocationID>, Equal<FSAppointmentFSServiceOrder.branchLocationID>>>,
                       And2<
                           Where<
                               Current<AppointmentInqFilter.customerID>, IsNull,
                               Or<Current<AppointmentInqFilter.customerID>, Equal<FSAppointmentFSServiceOrder.customerID>>>,
                           And2<
                               Where<
                                   Current<AppointmentInqFilter.customerLocationID>, IsNull,
                                   Or<Current<AppointmentInqFilter.customerLocationID>, Equal<FSAppointmentFSServiceOrder.locationID>>>,
                               And2<
                                   Where<
                                       Current<AppointmentInqFilter.sORefNbr>, IsNull,
                                       Or<Current<AppointmentInqFilter.sORefNbr>, Equal<FSAppointmentFSServiceOrder.soRefNbr>>>,
                                   And2<
                                       Where<
                                           Current<AppointmentInqFilter.serviceContractID>, IsNull,
                                           Or<
                                               Where<
                                                   Current<AppointmentInqFilter.serviceContractID>, Equal<FSAppointmentFSServiceOrder.serviceContractID>,
                                                   Or<Current<AppointmentInqFilter.serviceContractID>, Equal<FSAppointmentFSServiceOrder.billServiceContractID>>>>>,
                                       And2<
                                           Where<
                                               Current<AppointmentInqFilter.scheduleID>, IsNull,
                                               Or<Current<AppointmentInqFilter.scheduleID>, Equal<FSAppointmentFSServiceOrder.scheduleID>>>,
                                           And2<
                                               Where<
                                                   Current<AppointmentInqFilter.staffMemberID>, IsNull,
                                                   Or<Current<AppointmentInqFilter.staffMemberID>, Equal<FSAppointmentEmployee.employeeID>>>,
                                           And2<
                                               Where<
                                                   Current<AppointmentInqFilter.SMequipmentID>, IsNull,
                                                   Or<Current<AppointmentInqFilter.SMequipmentID>, Equal<FSAppointmentResource.SMequipmentID>>>,
                                           And2<
                                                Where2<
                                                    Where<
                                                        Current<AppointmentInqFilter.fromScheduledDate>, IsNull,
                                                        Or<FSAppointmentFSServiceOrder.scheduledDateTimeEnd, GreaterEqual<Current<AppointmentInqFilter.fromScheduledDate>>>>,
                                                    And2<
                                                        Where<Current<AppointmentInqFilter.toScheduledDate>, IsNull,
                                                        Or<FSAppointmentFSServiceOrder.scheduledDateTimeBegin, LessEqual<Current<AppointmentInqFilter.toScheduledDate>>>>,
                                                    And<
                                                        Current<AppointmentInqFilter.fromScheduledDate>, LessEqual<Current<AppointmentInqFilter.toScheduledDate>>>>>,
                                            And<
                                                Where<
                                                Customer.bAccountID, IsNull,
                                                Or<Match<Customer, Current<AccessInfo.userName>>>>>>>>>>>>>>>,
               Aggregate<
                   GroupBy<FSAppointmentFSServiceOrder.appointmentID,
                   GroupBy<FSAppointmentFSServiceOrder.scheduledDateTimeBegin>>>,
               OrderBy<
                   Asc<FSAppointmentFSServiceOrder.scheduledDateTimeBegin,
                   Desc<FSAppointmentFSServiceOrder.srvOrdType,
                   Desc<FSAppointmentFSServiceOrder.refNbr>>>>> Appointments;

Build 23.108.0020

Appointment Summary (FS400100)

 

Business Logic

[PXFilterable]
        public PXSelectJoinGroupBy<FSAppointmentFSServiceOrder,
                LeftJoin<FSAppointmentEmployee, On<FSAppointmentEmployee.appointmentID, Equal<FSAppointmentFSServiceOrder.appointmentID>>,
                LeftJoin<FSAppointmentResource, On<FSAppointmentResource.appointmentID, Equal<FSAppointmentFSServiceOrder.appointmentID>>,
                LeftJoin<FSCustomerBillingSetup, On<FSCustomerBillingSetup.cBID, Equal<FSAppointmentFSServiceOrder.cBID>>,
                LeftJoin<FSGeoZonePostalCode, On<FSGeoZonePostalCode.postalCode, Equal<FSAppointmentFSServiceOrder.postalCode>>,
                LeftJoinSingleTable<Customer, On<Customer.bAccountID, Equal<FSAppointmentFSServiceOrder.customerID>>>>>>>,
                Where2<
                   Where<
                       Current<AppointmentInqFilter.branchID>, IsNull,
                       Or<Current<AppointmentInqFilter.branchID>, Equal<FSAppointmentFSServiceOrder.branchID>>>,
                   And2<
                       Where<
                           Current<AppointmentInqFilter.branchLocationID>, IsNull,
                           Or<Current<AppointmentInqFilter.branchLocationID>, Equal<FSAppointmentFSServiceOrder.branchLocationID>>>,
                       And2<
                           Where<
                               Current<AppointmentInqFilter.customerID>, IsNull,
                               Or<Current<AppointmentInqFilter.customerID>, Equal<FSAppointmentFSServiceOrder.customerID>>>,
                           And2<
                               Where<
                                   Current<AppointmentInqFilter.customerLocationID>, IsNull,
                                   Or<Current<AppointmentInqFilter.customerLocationID>, Equal<FSAppointmentFSServiceOrder.locationID>>>,
                               And2<
                                   Where<
                                       Current<AppointmentInqFilter.sORefNbr>, IsNull,
                                       Or<Current<AppointmentInqFilter.sORefNbr>, Equal<FSAppointmentFSServiceOrder.soRefNbr>>>,
                                   And2<
                                       Where<
                                           Current<AppointmentInqFilter.serviceContractID>, IsNull,
                                           Or<
                                               Where<
                                                   Current<AppointmentInqFilter.serviceContractID>, Equal<FSAppointmentFSServiceOrder.serviceContractID>,
                                                   Or<Current<AppointmentInqFilter.serviceContractID>, Equal<FSAppointmentFSServiceOrder.billServiceContractID>>>>>,
                                       And2<
                                           Where<
                                               Current<AppointmentInqFilter.scheduleID>, IsNull,
                                               Or<Current<AppointmentInqFilter.scheduleID>, Equal<FSAppointmentFSServiceOrder.scheduleID>>>,
                                           And2<
                                               Where<
                                                   Current<AppointmentInqFilter.staffMemberID>, IsNull,
                                                   Or<Current<AppointmentInqFilter.staffMemberID>, Equal<FSAppointmentEmployee.employeeID>>>,
                                           And2<
                                               Where<
                                                   Current<AppointmentInqFilter.SMequipmentID>, IsNull,
                                                   Or<Current<AppointmentInqFilter.SMequipmentID>, Equal<FSAppointmentResource.SMequipmentID>>>,
                                           And2<
                                                Where2<
                                                    Where<
                                                        Current<AppointmentInqFilter.fromScheduledDate>, IsNull,
                                                        Or<FSAppointmentFSServiceOrder.scheduledDateTimeEnd, GreaterEqual<Current<AppointmentInqFilter.fromScheduledDate>>>>,
                                                    And2<
                                                        Where<Current<AppointmentInqFilter.toScheduledDate>, IsNull,
                                                        Or<FSAppointmentFSServiceOrder.scheduledDateTimeBegin, LessEqual<Current<AppointmentInqFilter.toScheduledDate>>>>,
                                                    And<
                                                        Current<AppointmentInqFilter.fromScheduledDate>, LessEqual<Current<AppointmentInqFilter.toScheduledDate>>>>>,
                                            And<
                                                Where<
                                                Customer.bAccountID, IsNull,
                                                Or<Match<Customer, Current<AccessInfo.userName>>>>>>>>>>>>>>>,
               Aggregate<
                   GroupBy<FSAppointmentFSServiceOrder.appointmentID,
                   GroupBy<FSAppointmentFSServiceOrder.scheduledDateTimeBegin>>>,
               OrderBy<
                   Asc<FSAppointmentFSServiceOrder.scheduledDateTimeBegin,
                   Desc<FSAppointmentFSServiceOrder.srvOrdType,
                   Desc<FSAppointmentFSServiceOrder.refNbr>>>>> Appointments;
        #endregion

 


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • 253 replies
  • October 18, 2023

@MarcoL45 

You sure there is no other setup/preference causing this?

I just tested on my local 23.111.0019 instance with SalesDemo data and it seems to be sorting ASC for me:

 


  • Author
  • Freshman II
  • 9 replies
  • October 18, 2023
RohitRattan88 wrote:

@MarcoL45

You sure there is no other setup/preference causing this?

I just tested on my local 23.111.0019 instance with SalesDemo data and it seems to be sorting ASC for me:

 

I unpublished all customization in both instances. Which setup/preference could cause this?


  • Author
  • Freshman II
  • 9 replies
  • Answer
  • October 24, 2023

@RohitRattan88 

After investigating I couldn't find anything. What I ended up doing was overriding initialize() in the AppointmentInq_Extension.

 public class AppointmentInq_Extension : PXGraphExtension<PX.Objects.FS.AppointmentInq>
  {

    public static bool IsActive() => true;


        public override void Initialize()
        {
            base.Initialize();
               Base.Appointments.OrderByNew<OrderBy<Desc<FSAppointmentFSServiceOrder.scheduledDateTimeBegin>>>();
        }

  }

 


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • 253 replies
  • October 24, 2023

@MarcoL45 I am glad you figured out a solution but still strange why different behavior for me than yours.

 

Happy coding 😊


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