Skip to main content
Answer

Make Customer Primary Contact the default on Service Orders

  • May 13, 2025
  • 1 reply
  • 68 views

Forum|alt.badge.img

On our Service Order Type I have Require Contact selected and have Take Address and Contact Information From: set to Contact. When creating a new service order would like the Primary Contact for the Customer select to come up as default. Is this possible to do with PXDefault? If so, how?

Best answer by vdiaz

Thanks for the question!

You're on the right track — it makes sense to expect the system to default the Primary Contact when "Require Contact" is checked and the source is set to Contact. But as you've probably noticed, Acumatica doesn’t handle this automatically out of the box.

Unfortunately, using [PXDefault] alone won’t work here. That attribute is great for setting simple default values, but it doesn’t support pulling related data like the customer's Primary Contact dynamically.

To get the behavior you're looking for, you’d need a small customization. 

This would typically involve:

  1. Extending the ServiceOrderEntry graph.

  2. Subscribing to the RowSelected or FieldUpdated event on the CustomerID field.

  3. Using BQL to retrieve the Primary Contact for the selected customer.

  4. Setting the ContactID field on the document accordingly.

 

I found youre question was already answered here:

 

 

1 reply

vdiaz
Acumatica Moderator
Forum|alt.badge.img+2
  • Acumatica Moderator
  • Answer
  • May 26, 2025

Thanks for the question!

You're on the right track — it makes sense to expect the system to default the Primary Contact when "Require Contact" is checked and the source is set to Contact. But as you've probably noticed, Acumatica doesn’t handle this automatically out of the box.

Unfortunately, using [PXDefault] alone won’t work here. That attribute is great for setting simple default values, but it doesn’t support pulling related data like the customer's Primary Contact dynamically.

To get the behavior you're looking for, you’d need a small customization. 

This would typically involve:

  1. Extending the ServiceOrderEntry graph.

  2. Subscribing to the RowSelected or FieldUpdated event on the CustomerID field.

  3. Using BQL to retrieve the Primary Contact for the selected customer.

  4. Setting the ContactID field on the document accordingly.

 

I found youre question was already answered here: