How do I create a select field in a suitelet for e...
# suitescript
t
How do I create a select field in a suitelet for entities similar to how netsuite handles it? In the UI you can filter by type of entity, like customer, employee, etc. When I create a select field for an entity, the field is just blank with no select options. I can manually add all the options I need but how can I add the same filtering logic? This is a field in a sublist
Copying the first result you see on google doesnt help. Maybe re-read my question because this is clearly not what I was asking simple smile
If anyone has advice on this, please let me know. It seems the filtering netsuite does by default with entity fields is some logic not accessible in suitelet fields. I can addSelectOption but theres nothing to categorize this
j
Can you post a screenshot of what you mean by “In the UI you can filter by type of entity, like customer, employee, etc.”
t
for example this is what happens if I add a field to a record through the UI. It has this extra dropdown menu which lets me select the type of entity
j
what page are you on there?
t
This is just a custom record where I now added a field through the UI, of type list/record
In my suitelet I was trying to see if it's possible to add similar logic where I can filter on the options in my select field. I have no problems adding every entity I need to the select options, but it's all just displayed in one list with no filtering or searching capabilities either.
j
Do you mean you set up your custom field like this and you want to do the same with suitelet
t
Yes that's what im referring to for the screenshot
j
hmmm haven’t seen that sort of thing before in a Suitelet. Suggest you create a dropdown yourself for the Type of Entity, then one drop-down for each type, and hide/show using Client script based on what is selected in yoru Type dropdown.
👍 1
t
I was hoping to avoid that but yea that might have to be the option
c
I know you're going down the suitelet path, but if you get a chance I would also check out the single page applications (SPA) that use the new UIF framework. This is what is going to be replacing suitelets so it may be worth it to take a look at and maybe implementing using that.
t
from what I've seen, that requires more custom logic compared to what suitelets already implement. it doesn't seem all that enticing at the moment if a suitelet can handle what I need. I'll definitely look into it in the future but already made most of this suitelet logic and now realized I need a different field from what I'm using
c
I gotcha. I was just spreading the word as I didn't even know they existed until recently
j
I saw them at SuiteWorld a couple of years back but they were still fairly new and limited at that time.
n
For SPAs, I think you need partner ID as they are enabled by NS for specific accounts? It's not generally available. @creece Please prove me wrong as I am also looking forward to try SPAs in NS. From NS Docs: _You use SuiteApp projects created with SDF to develop and deploy SPAs in NetSuit_e In NetSuite, SPAs are built as part of an SDF SuiteApp project and includes these components:
c
I believe it went GA in 25.1. Any new accounts we've created or existing accounts on 25.2 all have it. You just create an SDF app and can add it in and deploy it. I did not need a partner ID for anything.
🎉 1
n
I will give it a shot! Thanks @creece