I have defined a custom field on the Address recor...
# ask-stanley-ai
b
I have defined a custom field on the Address record. How can I retrieve the value of that custom field using SuiteQL via the REST API?
c
AI generated answer (using internal Slack threads):
To retrieve the value of a custom field on the Address record using SuiteQL via the REST API, you can use a SuiteQL query. However, please note that the custom field value is not directly accessible from the Address record in SuiteQL. You would need to join it with the appropriate record that the address is associated with (e.g., Customer, Vendor, etc.). Here is a general example of how you might structure your SuiteQL query:
Copy code
sql
SELECT 
    custrecord_your_custom_field
FROM 
    transaction 
WHERE 
    mainline = 'T' 
    AND entity = your_entity_id
Replace
custrecord_your_custom_field
with the ID of your custom field and
your_entity_id
with the ID of the entity (Customer, Vendor, etc.) that the address is associated with. To execute this SuiteQL query via the REST API, you would make a POST request to the
/query/v1/suiteql
endpoint with the SuiteQL query in the body of the request. Please note that this is a general example and may need to be adjusted based on your specific use case and NetSuite setup. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.853422344
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846018553
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838874221
Please provide your feedback on this answer.