Is there any way I can add a server side, or clien...
# suitescript
d
Is there any way I can add a server side, or client side script to the “view” mode of Sales Orders? I can only seem to add scripts on create/edit/copy
l
"Client scripts only execute in edit mode. If you have a deployed client script with a pageInit entry point, that script does not execute when you view the form. It executes when you click Edit."
Why do you need it on View mode? What are you trying to achieve?
d
@Lea CC I’m trying to add a ‘revised total’ into the summary table on an SO, this would look at fields on line level
Don’t worry, I’ve found some old code that adds in buttons to the view screen, I’ll hack around with that 🙂
l
you can play with inlinehtml field, but it requires a lot of 'hacking'
d
@lukasz I’m finding that with netsuite 😉
l
Enjoy 😄
m
i cannot seem to get it to work though
d
@Menno Janssen I’ve ended up just using an existing script that manipulates the form to include
form.addField('custpage_revised_total_js', 'inlinehtml', '', null).setDefaultValue('<script src=XXX"></script>');
Then from my script run jQuery.(document).ready, from there I can use nlAPI
(SS1.0)