Hi @ppowell To achieve this, it requires a small piece of customization.
Thanks for confirming it’s possible.
I believe I would need the add a field updated event and put in the logic there to update the field with the value that was just updated.
I had a look at adding this on the primary contact field (top right) and can get the value I want to insert into the default contact email address field (bottom left under additional account info) but I can’t see how to reference that field. They both seem to be called Contact.EMail and if I add an event handler to either I seem to end up with the same code. Is there a way to specify it's the contact,.email under DefContact instead of PrimaryContactCurrent?
This is what I have so far which admittedly is not much:
protected void Contact_EMail_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e, PXFieldUpdated InvokeBaseHandler)
{
if(InvokeBaseHandler != null)
InvokeBaseHandler(cache, e);
var row = (Contact)e.Row;
if (row == null) return;
// Update the value in Contact section
PXTrace.WriteError(row.EMail);
}
Or am I going about this completely the wrong way?
Thanks for any pointers,
Phil
Hi @ppowell were you ever able to resolve your issue? Thank you!
Hi @Chris Hackett, no we were not able to resolve this and it would really save a lot of time for us if this was possible. I’ve looked at it again and I just can’t tell how to target the correct fields to accomplish this.
Phil
Hi @Naveen Boga, thanks for responding, I really appreciate it. I’ve had a look but I’m stumped on how to target the correct Contact fields. Do you know how I would target the correct field to update the additional account info email and phone no when the primary contact email and phone no is entered?
Thanks,
Phil
You might want to check the answer on this one: acumatica - Updating default contact on customer adds new record - Stack Overflow
You will want to target the BAccount record as the base graph, and then update your Contacts relative that record. The Additional Account Info is part of the DefContact record. There are some “default” contacts for Customer records that live behind the scenes and implement an inheritance scheme. MainContact is the primary contact object, and it contains the address info in the “General” tab of the Contact screen. Then there are the Billing and Shipping contacts, which will inherit from Main Contact, unless the “Override” option is chosen on the Billing or Shipping screens. The info you want to update is located in the “DefContact” record, which is another behind the scenes contact record for the “Additional Information” section of the Customer record.
So I think targeting FieldUpdated is fine. But these records reside in different contact objects, and unless Additional Info has been filled out yet, the DefContact might not even exist yet. So you will have to manage populating DefContact and the Primary contact when the other is created or updated.
Hi @rosenjon, thanks so much for your response. I will look into doing it that way. I really appreciate you giving your time to answer this.
Phil