Using SuiteQL, discover if a transaction line is d...
# ask-stanley-ai
d
Using SuiteQL, discover if a transaction line is dropship or specialorder
c
AI generated answer (using internal Slack threads):
To determine if a transaction line is a dropship or special order using SuiteQL, you can use the
appliedtolinktype
field in the
purchaseorder
table. This field will contain the link type of the transaction, which can be either 'dropship' or 'special order'. Here is a sample SuiteScript code that creates a search to find this information:
Copy code
javascript
let purchaseOrderId = // Add your purchase order id here

let searchResult = search.create({
    type: "purchaseorder",
    filters: [
      ['type', 'anyof', 'PurchOrd'],
      'AND',
      ['mainline', 'is', 'F'],
      'AND',
      ['internalid', 'anyof', purchaseOrderId],
    ],
    columns: [
      search.createColumn({ name: 'appliedtolinktype' })
    ],
});
In this code, replace
purchaseOrderId
with the ID of the purchase order you are interested in. The search will return the
appliedtolinktype
for the main line of the purchase order with the specified ID. This field will contain the link type of the transaction, which can be either 'dropship' or 'special order'. ****** 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.823227465
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816570461
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.814659178
Please provide your feedback on this answer.