Closed timmyd87 closed 1 year ago
That is odd. Do you know what the raw XML looks like?
You can Enable Logging or use an HTTP Proxy to view the data.
Thanks @ruckus , Screenshot of XML from logs here:
Which looks fine to me, removing '.address' and just saving what's coming back from the gem using contact.email_address - i get:
Try reading customer.primary_email_address
not contact.email_address
, like
c.email = (contact.primary_email_address.address if contact.primary_email_address.present?),
I copied and pasted that line above from your message and just noticed the trailing comma ,
.. ? Whats up with that? Could that be doing the multiple assignment?
It....... it was the comma, i had no idea a simple comma could cause such a fuss, thank you for taking the time to respond @ruckus ... i think it was a hangover from a 'find_or_create_by' action i used previously.
Hey team, i'm getting an array of [email, mobile and id] when getting all contacts. I'm saving them to my app with
c.email = (contact.email_address.address if contact.email_address.present?),
but what's being saved is:
(see the values in the [] brackets).
I also reverted to using the raw "primary_email_address.address" but i get the same output.
What's strange to me is using the same method but with 'primary_phone.free_form_number' saves the phone number beautifully.
Am i calling the wrong model to save this? Or could something have changed on Intuit's end?