How to make set sublist mandatory? - netsuite

I want to make a mandatory field in a purchase order using a script. If the Body Field is selected for Trade PO, then the "sub-product" sublist is Mandatory and if the PO is General, then the "sub-product" sublist is non-mandatory.
How to make the script?

Related

How to add a column to the Sub record inventory detail?

How to add a column to the Sub record inventory detail?
just like expiration date on inventory number subrecord on Item Receipt, can we have a custom field for manufacturing date in inventory number subrecord. Is there any feature need to be enabled? Does NetSuite have any functionality of Production/Manufacturing date? or any way to create a custom field in inventory number subrecord that is visible in IR subrecord?
In Netsuite go to
Customization -> Lists, Records, Fields -> Item Number Fields
If you have a production run you either have lot numbered or serialized inventory. You can make the field applicable to all Lot Numbered or all Serialized or to just specific skus.
Note that the items need to have been created as lot numbered or serialized items. If the items you want to use were not created as such then you’ll need to replace them with new items. If you want to use the same skus for the new items you’ll need to rename the original items.

sorting list of items with specific field on sales order item sublist NetSuite

I like to sort the list of items in the dropdown in the standard NetSuite sublist item. Let's say items are sorted with the name when clicked on >> to open the dropdown list.
Is this possible to sort this list with any other fields, maybe a custom field on items record. let's say I add a custom field on the item record (every item), which is some numbers.
displaying that list with the order by that field.
I have seen a way around to create a custom sublist of my own requirement and then hide the standard and show the custom on a specific record by customizing the form.
I had a similar issue once, I did the following:
You can create a new body field or sublist field based on your business using userevent script(before load).
Create a search with the required order(you can do any operation to prepare your data) after that you filled the result manually to the new custom field.
Whenever the user selects a value in the custom field you set the original one to be the same as the custom one. For this one, you will need a client script.
Note: you can show your custom field and hide or disable the original field only not the whole list since the client script will be responsible to set the value to it. using this approach will not require you to add or edit any of your records which will be helpful if you have a complex process and a lot of dependencies. This approach worked for my issue I hope to be helpful to you too.

Build a new subrecord in Netsuite

In case I need to build a new Subrecord include Item Sublist, does SuiteScript can do that?
Like Build a Custom Record that has a sublist, and Sublist has a Subrecord..
I just wanna ask: do customization with SuiteScript can help us to do that?
Thank you,
Ba Loc
Currently you cannot have custom Subrecord in NS.
Try Below Solutiom
1. Create a Transaction Line Fields
2. Then set field type as List/Record and select that custom list
3. Apply to particular transaction forms
Note: Navigate to Customization -> List,Record Or Fields -> Transaction Line Fields

restlet item group cusstom price

I am trying to create an SO using restlet in Netsuite. The question that I have is when the item is an itemgroup, how do i pass the json so that the restlet can customize the price level etc for children elements of the group.
Currently if I pass the parrent, the child items automatically get passed in the SO that is created via restlet. Here unfortunately I can only control the Quantity and not price level.
Is there a way so that I can pass( from different endpoint) Json to the restlet so that It can create the SO with all the right pricing for ItemGroup?
Thanks in Advance.
I don't think you can do this. You can't change the price of an item for a specific sales order. The price will only change if you change the value of the Item record in NetSuite.
You could look at adding discounts on your Sales Order. If your prices on an order differ from the item price on NetSuite,you can add a discount item to the sales order.

Custom Record For suitelet Sublist -Netsuite

I have a requirement where i should display the details(values) of the custom record in the suitelet sublist.
Now i have to create a custom Record with two fields. One field would be bill payment and other field will have list of bills related to bill payment.
When i create a custom record what should be my field vaues's type?
Appreciate any help.
I would suggest to keep one field of type List/Record and Record option to "Transaction", and second field of type Multiple Select with record option to "Transaction".
Since, the fields can hold reference to any transactions I would recommend writing a user event script which would fire on create/edit and validate that the fields value are always correct.

Resources