Skip to main content
Answer

Need help in Generic Inquiry with Customer field

  • July 31, 2023
  • 3 replies
  • 81 views

Forum|alt.badge.img

Hello, in Sales Order GI, the customer CD and Customer Name are displayed from the SOOrder Object.

Object:SOOrder and Data Field:CustomerID this gives us customer cd, but when we use same in if condition it is giving us customer DB ID. Can someone please help us. We know we can join BAccount table but can i get customer cd without joining BAccount table.

=IIf([SOOrder.CustomerID] >0 , [SOOrder.CustomerID], '0') here the result is Customer DB ID

Best answer by darylbowman

Then I would join Customer on SOOrder.customerID = Customer.BAccountID and use Customer.AcctCD in your conditions.

3 replies

darylbowman
Captain II
Forum|alt.badge.img+15

The correct way to do this would be to join the Customer table and use Customer.AcctCD. Is there a reason why you do not want to join extra tables?


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • July 31, 2023

Hello @darylbowman, no reason,  just want to make sure that not making any mistakes by joining extra tables.


darylbowman
Captain II
Forum|alt.badge.img+15
  • Answer
  • July 31, 2023

Then I would join Customer on SOOrder.customerID = Customer.BAccountID and use Customer.AcctCD in your conditions.