We've got several transactions which have a billin...
# suiteql
m
We've got several transactions which have a billing address shown in the UI, but when we query the
transaction
view, the
billingaddress
field is
NULL
. Where can we query these address details? In the UI, the "Bill To Select" field is empty, but the Bill To textarea box has an address in it. Any thoughts?
j
Are you sure that’s not a custom field you have there? I just tested on mine and the
billingaddress
gives me the ID of the address record in NS (numeric internal id)
m
It's definitely the native
billaddress
field. In most situations, the "Bill To Select" field contains the label for an existing address on the customer, or the word "- Custom -". In these situations, the
billingaddress
field has a value. In this situation, the "Bill To Select" field in empty in the UI and
null
in SuiteQL, even though there is an address displayed in the
billaddress
field. We have several examples of this for both Invoices and SOs.
w
Check *Records Catalog*.
Copy code
SELECT
    tam.*,
    tama.*
FROM
	transaction t
	left join transactionAddressMapping tam on tam.transaction = t.id
    left join transactionAddressMappingAddress tama on tama.nkey = tam.address
where t.id in(8852980, 8853804)
m
Thanks, Watz! For transactions with this problem, when I query
transactionAddressMapping
, I expect to get two results, one for shipping and one for billing. In these cases, only the shipping address record is returned.
w
And there's no beforeLoad that fills out the field from somewhere else?
If the field is set with
Copy code
nlapiSetFieldValue('billaddresslist','')
nlapiSetFieldValue('billaddress','this is my address')
I get the same result as you do. Only a shipping address in
transactionAddressMapping
m
Well, thanks to your help, I can reproduce the issue, but I've searched our codebase and workflows for references to those fields and it doesn't seem that we're setting them. I'm not sure how this is happening. Thanks for pointing me in the right direction, though!