how do you add a button to the netsuite app? conte...
# suitescript
m
how do you add a button to the netsuite app? context.form.addButton does not seem to work 🙂
c
That is the correct module. Are you doing it in beforeLoad of a user event script (not client)?
m
yes, beforeLoad
s
you mention app, what are you doing? is it a suitelet? if it's a suitelet, you need to do so before response.writePage In before load it is only context.form.addButton if you have beforeLoad(context){}
m
it is the standard netsuite app (on iPhone 🙂) and a user event on vendor bill (beforeLoad)
s
i haven't worked with the netsuite app, but from my understanding i dont think that's possible.
what I can say though is you can try to run a few tests to capture the userevent to see if you can pinpoint the user event when the app calls, and then do behaviour based on that, like maybe in addition with a checkbox
m
yes, it logs before and after the context.form.addButton
also thinking about checkboxes but it will not give the same ui experience 😞
s
the netsuite app from my understanding is not customizable (not in the way of adding new buttons or UI changes) edited in correction to @Cory Weiner
the next closest thing is for you to develop an app that calls a restlet, then you can do ui customization on the app
c
You can definitely add fields to the app. I’ve done it before. However I would first verify that it is working on desktop
s
@Cory Weiner wait but you can add buttons to the app? I think yea, the CBs will pop up
@Mattias Uppström we've had clients that write apps used by the retail sales, and the app would send information back to a RESTlet for processing. I'm sure that's possible.
m
I have no problems writing an app using RESTlet or similar but it would make it a lot easier to have the buttons in the standard app 😉
s
@Mattias Uppström good luck my friend, I don't have a better suggestion using the standard app other than using adding CBs and pushing the stuff to server side, workflows etc
m
thanks, what do you mean with CB? client broker? 😀
c
Yes I have added form elements before in user event script, and those same form elements show on both the app and desktop client. I’ve only tested that on the android app to be fair, but it should work.
🙌 1
I haven’t specifically tested add button, but add field will work. You could always do an inlineHTML field and add a button with your own callback
s
I see, jquery?
t
If I remember it correctly, script added buttons will not show up in the NetSuite mobile app but workflow added buttons will
m
Do workflow action scripts run from mobile app?
t
yes, WF action scripts trigger on mobile app