This message was deleted.
# suitescript
s
This message was deleted.
b
depends on what the button does
r
The button runs a suitelet
b
that could work depending on what the button does
r
Basically trying to change the action from a button click to a schedule
b
workflow action scripts dont run clientside, so you need to make sure that everything you do can be done serverside
r
It runs an EDI suitelet for exporting info
b
this sounds like you are trying to manage sps's integration
you dont really want to call a suitelet in serverside code
you dont have access to the cookie required to authenticate
and its a terrible idea to make the suitelet public
r
Going to try to make it a map/reduce script instead of a UE button
b
last time i looked there was already a scheduled script for this purpose
r
Any info on this by chance?
b
its been a while since i looked, but there should be a scheduled script in the bundle that the suitelet uses to do its work
r
That would make this whole thing easier ha. I'll look and see.
e
Is this for generating ASNs or PO Acks?
r
PO acid
Ack*
e
The SPS process uses a saved search as a template for the CSV-formatted data -> customsearch_sps_poack_template together with a call to a Suitelet when the button is clicked on the UI. In essence you just need to replicate that process. I use a map/reduce script that can be called from a Suitelet that batches the creation of those PO Acks for our use case. The process is basically just getting the results from the saved search and then converting it to a CSV and then saving the file to the file cabinet in the folder that SPS expects to find it.
r
Definitely agree this is all I need to do. @battk said the bundle might have this as part of the bundle already. Going to look at that before building my own process