Trying to set promotions in sales order using suit...
# suitescript
a
Trying to set promotions in sales order using suitscript but encountered the following error ..
b
Suitepromotions doesnt work well clientside using the record module
Try showing netsuite support while switching to server script
a
you mean that this script wont work in suitelet but work in schedule script
b
probably not in the client script you attached to your suitlet
but it could work in the suitelet itself
a
yup .. working in schedule but not in client script .. may be i have to think about a workaround
To solve this issue , what should i do ? can i call a server script from a client script that creates a sales order .. For example call a server script on a button click .. is that possible
b
sure
thats one of the primary uses of a suitelet
a
you mean that on button click i should call a suitelet script .. can suitlet return data back to the client script
E.G after sales order creation return id of newly created sales order back to the client script
b
yes
you can use a restlet as well if you plan on using json
a
ok .. i will try ..
var response = http.get({ url: "/app/site/hosting/restlet.nl?script=605&deploy=1", headers: { "Content-Type": "application/json" } }); SUCCESS_MESSAGES.push(response.body);
encountered this error while calling the restlet from a client script
b
use N/https
a
will try that . Thanks