I noticed that when I am adding a customer with a primary address in the Customers and Contacts application, the PrimaryAddress is set to null in the POST request. It looks like the Customers and Contacts application is calling /v2/data/AddressCrossReference:fetch PUT request to load the addresses for that customer. I remember at one point, Directory’s PrimaryAddress was set to the primary address in the POST request. Is PrimaryAddress Setting to Null a change in the 25.1 release?
Hi David! The PrimaryAddress on the directory record only gets set for the following address cross reference criteria:
- The address record contains a type of
MAIN - The address record is marked as Primary = True
Both 1 and 2 must be true for the field to be set on the directory record. Historically, that field was always tied to one address, but because of an enhancement that now allows multiple primary addresses for a variety of address types, it was decided to only reference the one marked as MAIN.
Note: Only one primary address per address type is allowed
Hi Tyler,
Yes, in my case, the primary address I created has address types of “Main” and “Ship to” and the Primary flag set to true. However, when I save the customer, I would see PrimaryAddress set to null in the request payload in DevTools.
@david.lee if there’s no partner or customer logic involved in how that is happening, then that looks like a bug.
If you are a Nextworld customer or partner work with your system administrator to submit a ticket with customer support, who will file a bug on your behalf. Include a link to this post in the ticket. If you’re not a Nextworld customer, keep an eye on release notes. We’re always making improvements.
@ian.p , yes, I will file a freshdesk ticket with reference to this post and I will also attach more details to the ticket. Thanks.
I have confirmed that in the base product, the PrimaryAddress field on directory records works as @tyler.pham described when records are created via the UI. It gets passed in empty, but so long as a primary/main address was specified in the address list, the response from the server includes that attribute being set in the response.
I looked at the logic @david.lee is working with and records entered from the UI are behaving as if they are originating from an integration due to additional logic that has been added prior to the base logic.
@ian.p I saw your comments in the freskdesk ticket. I will try to see if I could find who set that integration flag. Thanks for your help.