https://netsuiteprofessionals.com logo
#suitescript
Title
# suitescript
m

Mattias Uppström

04/08/2022, 1:41 PM
how do you add a button to the netsuite app? context.form.addButton does not seem to work 🙂
c

Cory Weiner

04/08/2022, 1:50 PM
That is the correct module. Are you doing it in beforeLoad of a user event script (not client)?
m

Mattias Uppström

04/08/2022, 1:52 PM
yes, beforeLoad
s

Sciuridae54696d

04/08/2022, 2:15 PM
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

Mattias Uppström

04/08/2022, 2:16 PM
it is the standard netsuite app (on iPhone 🙂) and a user event on vendor bill (beforeLoad)
s

Sciuridae54696d

04/08/2022, 2:17 PM
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

Mattias Uppström

04/08/2022, 2:18 PM
yes, it logs before and after the context.form.addButton
also thinking about checkboxes but it will not give the same ui experience 😞
s

Sciuridae54696d

04/08/2022, 2:19 PM
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

Cory Weiner

04/08/2022, 2:20 PM
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

Sciuridae54696d

04/08/2022, 2:21 PM
@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

Mattias Uppström

04/08/2022, 2:24 PM
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

Sciuridae54696d

04/08/2022, 2:25 PM
@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

Mattias Uppström

04/08/2022, 2:30 PM
thanks, what do you mean with CB? client broker? 😀
c

Cory Weiner

04/08/2022, 2:34 PM
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

Sciuridae54696d

04/08/2022, 2:37 PM
I see, jquery?
t

tech_ph2019

04/08/2022, 5:25 PM
If I remember it correctly, script added buttons will not show up in the NetSuite mobile app but workflow added buttons will
m

michoel

04/09/2022, 10:48 PM
Do workflow action scripts run from mobile app?
t

tech_ph2019

04/11/2022, 1:33 AM
yes, WF action scripts trigger on mobile app