AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • In-Person Gatherings
    • Power BI Workshop
    • Podcast
    • Rolodex
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Generic I...
Need help joining S...
 
Notifications
Clear all

Questions [Solved] Need help joining Sales Order with Appointment (or Service Order)

 
Acumatica Generic Inquiries & Pivot Tables
Last Post by Tim Rodman 7 years ago
3 Posts
2 Users
0 Reactions
2,904 Views
RSS
Alisann Crough
Posts: 28
 Alisann Crough
Topic starter
January 22, 2019 3:43 pm
(@alisann-crough)
Eminent Member
Joined: 7 years ago

The GI I'm currently working on requires info from both the Service Order and the Appointment (and Sales Order). When I joined them using SOOrder Inner FSAppointment with soRefNbr = soRefNbr and SOOrder Inner FSServiceOrder with orderNbr = refNbr, it didn't return all my Sales Orders. If I change it to a left join then I get all my Sales Orders without all the Service Orders. What I discovered was that it only finds the Service Orders created from the Sales Order. If the Service Order was created first and the "Generate Invoices from Appointment" process is used to create the Sales Order (IN), then the join doesn't find the Service Order associated with the Sales Order. I understand that it is possible to have many Sales Orders per Service Order since there can be one for each appointment so I know Sales Order needs to be joined with FSAppointment.

Does anyone know how to join Sales Orders and Service Orders that were created this way?


2 Replies
Alisann Crough
Posts: 28
 Alisann Crough
Topic starter
February 3, 2019 6:08 pm
(@alisann-crough)
Eminent Member
Joined: 7 years ago

I have an answer now. This works for Sales Orders created from Appointments. I linked them as follows.

SOOrder  Left SOLine       using        orderNbr = orderNbr

SOLine  Left FSAppointment      using       AppointmentID = appointmentID

FSAppointment  Inner FSServiceOrder       using      soRefNbr = refNbr


Reply
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
February 9, 2019 12:35 am
(@timrodman)
Famed Member
Joined: 11 years ago

Hi Alisann,

Thanks for posting your answer.

I don't know the Service Order module very well, but I just checked the primary keys on those tables and it looks like there are two fields needed to form the primary key on each:

FSAppointment: SrvOrdType and RefNbr

FSServiceOrder: SrvOrdType and RefNbr

SOOrder: OrderType and OrderNbr

You might want to include the Type columns in your joins, not just the Nbr columns just in case you wind up with the same number getting used across multiple types (it's possible).


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,532 Topics
  • 11 K Posts
  • 30 Online
  • 2,420 Members
Our newest member: Katerina Pawlowski
Latest Post: Can't export GI's to excel that contain the FATrans DAC after upgrade to 2025 R1 in less than 25 min
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

  • Terry Payne
Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×