Is it possible to programatically get all the supported sub record (both sublist sub record and body level sub record) for a specific record type or nlobjrecord?
I don't think this is possible because you need to define the record type/sublist type that you need to access.
Related
NetSuite custom list internal id for values is disabled by default. is there a way i can add my own id for the custom list values.
i am trying to create a custom record to save expense clain details for employee. i have many list to hold datas for diffrent category. it will be better insted of 1,2,3 i can give my own Internal id.
Brett's answer gives you a method by which you can change the text ID of the list, but you cannot change the internal ID of the list's values. This id is set automatically by NetSuite (or probably the underlying database) and is needed to ensure consistency of data within the application. Instead, consider converting the list into a custom record, which will allow you to create another field to use as an external ID, which you can add/update by CSV import (you need to use the Internal ID as key when doing this).
Once converted to a record, you could also add a new field to use as a reference, depending on how you're using it.
To convert to a record, simply check the Convert to Custom Record box on the list page shown in your screenshot and click Save.
Click the “Change Id” button
Enter the new value.
Click Save
Note: Netsuite will prefix the value you enter with ‘customlist’
I'm trying to add sublist to the custom record in Netsuite.
Is there any way to add sublist to the custom record?
Appreciate any help.
It depends on how you want the sublist to function. You have the option to create another Custom Record and used the existing as parent record. That will act as a sublist.
Objective:
I'm trying to dynamically insert all possible
subitem [cost layer and sub layer combination] that are valid / checked
in Distribution->Stock Items->Cross-Reference Tab (with alternate type of: Barcode and dynamically generated AlternateID).
My presumed strategy is:
1.) to get the list of InventoryItem's list of Cost layer (that are checked) iterate thru,
2.) get the list of sub layers (that are checked), iterate thru,
3.) then compose the SubItem code by concatenating the iterated Cost Layer and Sub layer,
4.) after composing the SubItemCode, populate other INItemXRef fields like AlternativeID in which we generate from another class,
and select the AlternateType of 'BAR'
5.) and other codes like validating if it already exist or not yet before continuing to generate the AlternateID.
but the problem is from 1 to 3:
Acumatica uses IDs for SubItem in INItemXRef.
Its parent table is INSubItem where "SubItemCD" and "SubItemID" are stored.
"SubItemCD" is the product of the concatenated Cost Layer and Sub Layer.
you store or insert these SubItemCDs first by manual f3 selection (both Cost layer and sub layer) in Stock Item's Cross Reference Tab, then only the SubItemID are inserted by acumatica.
these hinders me in coding on how to automate generating and inserting multiple InventoryItem-Subitem Barcodes for each Inventory Item. and other functions like check if that InventoryItem-SubItem combination already exists before proceeding.
What is the proper acumatica way in doing the said objective? or what strategy or tip could you help me in reaching our objective?
thank you.
Update: just learned that checked Cost Layer and SubLayers are stored in INSubItemSegmentValue
On the vendor record, I need to loop over the Subsidiaries sublist through a scripted search, to get all of the values. I am specifically trying to find vendors that do not belong to a particular subsidiary.
UPDATE
To clear up my question, I was trying to access the Subsidiaries sublist and not the actual primary subsidiary. However NetSuite said that this is currently not possible and is a requested enhancement.
bluejay92, the vendor search has a join to the subsidiary record, see attach screen shot. You can even check "use expressions" to gain access to the NOT function in the criteria.
Workaround:
1 - Create a user event script that runs after the record is created/edited.
2 - Have the script load the record, get the subsidiaries and create a custom record to save the info so you can search it later.
3 - Export all vendors internal ids in 1 column. Run a CSV import of vendors and map internalid csv column to internalid field to trigger the user event script and populate the custom records.
Extra tip: Make sure the script does 'upserts' to the custom record to avoid duplicates. There should be one record per vendor.
I need the end user to select which field he wants updated. Is there an option to have a lookup input parameter that let's the user select a field of the current entity?
I need it to perform operations on the value of the selected field.
As far as I know there isn't a custom type to handle a list of fields (or a list of strings) as InputParameter for a Custom Workflow Activity.
The (ugly) alternative is to use a string parameter where the user enters the field name.
If the list of fields isn't very big, you could add an optionset to the form with those field names and then your workflow could have If conditions based on that optionset.
I strongly suggest you to use a dialog to complete this. You can set the stage, the parameter and based on the situation the values to insert. Also you can execute workflows from the dialog itself.
If the record already exists, consider registering a plug-in on the update message. When in update the request InputParameter["Target"] contains only dirty fields changed by the user.
Instead of creating a list of fields you can create another (role) form to limit the fields the user can edit on the form.