how can i load a custom record in 2.0, using exter...
# suitescript
l
how can i load a custom record in 2.0, using external id
a
`record.load({id:query.runSuiteQL(
SELECT id from mycustomrecordtype where externalid = ${myexternalid}
).asMappedResults()[0].id, type: mycustomrecordtype})`
🙌 2
Using SuiteQL
l
any idea how to do this using suitescript 2,0
a
Copy code
record.load({id:query.runSuiteQL(
"SELECT id from mycustomrecordtype where externalid = '" + myexternalid + "'" ).asMappedResults()[0].id, type: mycustomrecordtype})
l
thanks
s
note: if using typescript you don't rewrite the code above - you just emit it as SS2.0 or SS2.1 target.