we are trying to have a script run to automatic se...
# suitescript
s
we are trying to have a script run to automatic set the lot number(only from specifc user) when should it run before submit as a user event . since we want this sciprt to run when using the mass fufil i assume it would need to be user event ?
b
you probably wouldn't even have that
inventory details are pretty mandatory, you wont get to before submit without inventory details
s
im coping the ui after page load would be what ?
and i assume before load wont work with kits to set the inv detail
b
try fulfilling a sales order with an item that requires lots on the bulk fulfill page
s
it fails i know that
b
that error happens before you get to before submit
it was never an option to use before submit
s
before load?
b
usually not an option either, modifying records in before load tends to fail for anything that couldnt be implemented as a default value
s
so im stuck , kit item cant add the inv detail to the sales order , and cant scipt it on the item fuilmnet
hopefully, my boss will see it that way also i have major pressure to fix this issue3
b
first option is not to use the bulk fulfill page
and implement your own using a suitelet
s
if i use my own can i create my fufill page , and we use mark all submit then what ?
b
you create your own fulfillments and can set whatever inventory detail you want
s
what what would display on the list in the suitelet ?
b
id go for a list of sales order to fulfill
with a checkbox to mark which you want to fulfil
s
sounds very similar to the native so far
b
correct
its nothing new
its just that you control the fulfillment being created
s
what would the submit button being doing transform the sales order?
that the part im confused about
b
thats not likely to work out
unless you only fulfill a few sales orders
you are likely to hit governance issues
s
we fufil over 1000 a day
b
you need to task a map/reduce
s
so submit --> creates task --> run map/reduce
which point are we adding the inv detail in the MapReduce function?
b
yes
s
ooh
i guess my brain is off after long day at work
that sounds do able
and we would be able to fufil more then 200 at time
b
user event scripts tend to be the worse option to implement logic
they are limited and come with performance costs
s
in my custom suitlet of displaying the orders , i could add the item name ( which for some odd reason is not native)
can i makes a custom suitelet for printing the packing slip and integrated shipping labels ?
b
you can use N/render for the packing slip
i dont think you can get the integrated shipping label from the suitelet
you will have to learn how netsuite generates the url to create a shipping label
s
we basically have two lists to print and would love to combine them together
b
your work is harder if you have to figure out how netsuite bulk generates labels
s
Your guess is as good as mine
@battk thanks for the ideas
Murphy law would say I'm going to spend the time building this and then netsuite will give the option to add lot numbers for kit items on a sales order
b
probably is on the unlikely side
that means they would need to put the member items on the sales order
and they cant do that on the item sublist without introducing compatibility problems
s
Yeah I know at least we could dream
In the map reduce each run would pass in the sales order record that would be transformed --set inv detail , save ?
b
you wont have a record
the values you get in map / reduce entrypoints are strings
which you usually parse
s
Which would be the sales order I'd ?
b
probably not if you are using a search or query
it would be a string representing the result
s
The result would be the sales order info as string ?
So take info call record.load ,record.transform save ?
b
not really sure why you want to load the record
s
So just straight to record transform? Or am I missing something
b
you wont escape this without learning how to transform records or how to write map reduce scripts
s
Got it
b
depending on your needs, you may be able to use a scheduled script instead of a map/reduce
s
I see I have my work cut out for me lol
I still have to lookup difference btwn scheduled script vs map reduce running on schedule
b
both are pretty much the same for scheduling
scheduled scripts are more basic and just have 10k points to work with
you need to figure out a rescheduling strategy if you need more points
s
Which one will run faster or the same ?
b
same, but you have to put much more effort into the scheduled script to get it to support concurrency
s
@battk I'm reading the docs it seems map/reduce should be faster as it can create more than one job for map stage vs schedule scirpt
Copy code
Additionally, multiple jobs can be created to handle the work of the map stage,
I'm trying to access the sublist value on an IF these two filed are coming empty
Copy code
inventorydetailreq  ,inventorydetailset
b
you can get scheduled scripts to use multiple processors too
s
so the docs are misleading i guess
b
it doesnt do it automatically like map/reduce scripts can
s
ok that makes sense
shouldn't inventorydetailset return something?
b
i dont recognize the field, so id guess no