Hi - we have a csv import (for PO's) and we'd like...
# suitescript
s
Hi - we have a csv import (for PO's) and we'd like to run a script that updates the default address of the supplier before the PO is created. In other words it would: • read-in the csv file of PO's • identify the shipping country in the first PO • call a script to update the supplier record address based on the shipping country • create the PO Does anyone know if this is possible? Would it be a matter of calling the script 'before load' or 'commit' in order to make the supplier update before the PO is created? Thanks in advance!
m
A user event script using the beforeSubmit entry point should do the trick. And make sure that you enable server side scripts in the CSV import configurations.
b
you wouldnt have the option the read the csv file, the user event script would only have access to the fields that were mapped by the csv import
so make sure to actually the map the address related fields so that you can use them to update the vendor
s
Thanks @battk that’s a good point. We may need to rethink this. I’m thinking of importing the file from file cabinet using a script and having full control.