Is it possible to create a dashboard portlet, you ...
# suitescript
r
Is it possible to create a dashboard portlet, you choose an entity from a list, the choice loads a user event script? Hope that makes sense.
m
You would need to perform a save to the record in order to trigger a user event script. That should be doable in a portlet script
r
Hey @michoel thank you for the reply. The current user event script is a button that shows before record load on the customer. Is this possible to show this button once an entity is selected on a portlet?
m
You wouldn't be able to show that same button (unless you do something hacky like loading the custom record in an iframe of the portlet). However, depending on what that button actually does you might be able to replicate it
If that button is just redirecting to a suitelet for example, you could create a button that redirects to the same suitelet with the same parameters
r
@michoel okay interesting. It's a button that pops up a form
It's a clientscript
m
Is this part of a bundle or your own code?
r
it's a bundle but can access the code
m
I'm assuming the client script is just opening a suitelet
If so, you can add a button in your portlet and copy/adapt that client code to open the same suitelet
r
assuming that is this function - function openSmsSuitelet
I guess that's our own function but seems like a suitelet ha
m
That's probably the client code that opens the suitelet in a new window
I.e. user event adds button. button has client code that runs when clicked. client code opens suitelet in new window
r
ok cool. Is there a way to "deploy" a user event on the portlet?
m
No you can't do that. You would want similar client code in the portlet that opens the same suitelet
r
ok cool thanks for your help
Ill see what I can do
m
Sure, good luck
r
thanks