Can an N/Query RESTlet use the same field names as a REST query?

I have a select statement that searches for Purchase Orders using the REST API. Can I use the same select statement in an N/Query RESTLet?  For example, here is my select statement:

“sql”: “SELECT AS Internalid, t.TranDisplayName, t.tranid, t.status, t.tosubsidiary AS subsidiary, t.trandate, t.entity, v.entityid AS vendorname, t.custbody_edi_vendor AS IsVendor, v.representingsubsidiary, t.otherrefnum, t.location, t.shippingaddress, Shipping.addressee, Shipping.attention, t.custbody_bc_edi_status, t.custbody_edi_account, t.custbody_edi_997_accept, t.custbody_edi_997_reject, t.custbody_edi_shipping_code, t.custbody_ship_blind, t.custbody_ship_complete, tl.item AS ItemID, tl.Rate, tl.NetAmount, tl.Quantity, tl.custcol_custom_item_name, tl.custcol_bci_display_name, tl.custcol3 AS VendorPO FROM TransactionLine AS tl INNER JOIN Transaction AS t ON = tl.Transaction LEFT OUTER JOIN transactionShippingAddress AS Shipping ON Shipping.nkey = t.shippingaddress LEFT OUTER JOIN Vendor AS v ON t.entity = WHERE t.type = ‘PurchOrd’ AND t.custbody_bc_edi_status=’1′ AND t.custbody_edi_997_accept=’F’ AND (t.entity=’2351′ OR t.entity=’2851′) AND (t.status!=’H’ AND t.status!=’C’ AND t.status!=’A’) AND t.custbody_edi_vendor=’T’ AND tl.Item IS NOT NULL AND tl.taxline=’F'”

My concern is that REST uses the Connect Browser field names. Should the RESTLet query use the Schema Browser field names? My WHERE clause won’t work if we need to use Schema Browser field names since there are no fields such as NKEY and ID in the NetSuite objects. Any help is greatly appreciated. Thanks.

Rookie Asked on May 23, 2021 in SuiteScript.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor