hello everyone, my superior wanted a way for him t...
# general
u
hello everyone, my superior wanted a way for him to be able to click a button when viewing a Task so a window would pop up and he could just type in something, click save, and the value would get filled in at the Comment field. anyone have any idea how to pull this off in Suitescript? I know for a fact I need a UserEvent to make the button, and ClientScript to give the button some logic, and saving the text into the Task's Comment body field just needs a record.load and save, but how does one go about generating a custom layout window with buttons?
m
You can use a suitelet for that
u
i see. any ideas which modules to pull the rendering of the text box for? I can't seem to glean it off of the NSAPI pdf file, or am I missing something?
b
if you have very basic display requirements, you can use prompt in your client script function
u
@battk thanks. I'll see if I can integrate this first before making a suitelet. @michoel nevermind, i do believe I found it under
N/ui/serverWidget
. thanks!
k
Why can't he just use edit and type it in that spot himself? Seems like a waste of resources
👍 2
u
@KevinJ of Kansas tbh I agree, but I'm not exactly in a position to argue it, as he sees it as a more user-friendly way of doing things. To his credit, I see his point, as going into Edit runs the risk of making accidental changes to the original Task's values. Not to say he's incompetent, but the requested implementation makes sense with that perspective.
e
The system information log entries will take care of "accidental changes" since it should show the original value and the changes that were made.