Taylor
04/15/2021, 8:59 PMinternalid
of native NetSuite records to the table name for that record? E.g. say I have a custbody field that is List/Record of type Customer. If you were to run select fieldvaluetyperecord from customfield where upper(scriptid) = upper('custbody_my_cust_field')
the fieldvaluetyperecord
returned would be -2
which corresponds to Customer. How do you turn that into the fact that the list of options for this custom field would come from the customer
table/view?
For custom lists and custom records you can run select scriptid from customlist where internalid = [the fieldvaluetyperecord from prior query]
and then the scriptid
there would be the “table/view” to query for options for the List/Record field. Same thing for a custom record except you query against the customrecordtype
table/view. I have search a good bit and see no way to do this for the native record types though (which should all have negative internalid
).
I found a SuiteAnswer on running a little client side suitescript hack to build out the list of all the internalid/name pairs. But this hack still just gives the record “Name” not the table/view name to query against.
The point is to be able to start with just a field ID — e.g. custbody_my_cust_field
— and from there via SuiteQL/integration sync out of the account all the valid IDs that could be sent as a value for that custom field. The above can accomplish this when the custom field points at a custom list or custom record. But when it points at a native NetSuite record, I seem to be SOL.
If anyone has dabbled in this and has some insight that would be much appreciated.Taylor
04/15/2021, 9:10 PMscriptrecordtype
that seems like it would be exactly what I’m looking for. It returns this type of info:
"deploymentname": "Customer",
"name": "Customer",
"internalid": -203,
"skey": "CUSTOMER"
But Customer has internalid
of -2
not `-203`… so not sure what info that’s providing. It seems like it should be just what’s needed - the (native) record name, the deployment name if a user renames any of their records, the internalid, and then skey appears to be the table/view name to run a query. But the internalids
just aren’t correct for what I’m looking for (I assume they’re correct in some other capacity, but)Sandii
04/15/2021, 9:55 PM-2
refers to other things I believe). As an example, transaction
has an internalid of -30
but you will not find transaction in that Record Type Analytics table, the specific transaction types have their own ids instead.Taylor
04/15/2021, 9:58 PM-2
. The scriptrecordtype
table shows this for Customer:Taylor
04/15/2021, 9:59 PMinternalids
do not match anything I’ve seen for any of the records listed.Taylor
04/15/2021, 9:59 PMbattk
04/15/2021, 11:46 PMbattk
04/15/2021, 11:47 PMbattk
04/15/2021, 11:53 PM