The same API will create an inventory detail recor...
# suitescript
c
The same API will create an inventory detail record if one does not exist, you can use that to create your new one