How can I retrieve a salesorder's Primary Contact ...
# ask-stanley-ai
b
How can I retrieve a salesorder's Primary Contact using SuiteQL?
c
AI generated answer (using internal Slack threads):
To retrieve a sales order's Primary Contact using SuiteQL, you would need to join the sales order with the contact record. However, it's important to note that SuiteQL does not directly support joins. Instead, you can create a saved search in NetSuite where you join the sales order with the contact record. Here's a general idea of how you can do it: 1. Go to Lists > Search > Saved Searches > New. 2. Select Contact from the list. 3. In the Criteria subtab, add a new criterion. Select Transaction from the dropdown, then select Sales Order. 4. In the Results subtab, add the fields you want to retrieve (e.g., First Name, Last Name, Phone, etc.). 5. Save and run the search. This will give you a list of contacts that are attached to a sales order. You can then use SuiteQL to query this saved search. Please note that this is a general guide and you might need to adjust it according to your specific needs. ****** 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.87323
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834106445
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.83380127
Please provide your feedback on this answer.