UI actions on analyst workspaces

Swetha M
Mega Guru

We've a UI action REQUEST IP BLOCK on our security incident form and it does the following, populates the IP block into the form field.

 

 

var ip_block = new GlideRecord("u_ip_block");
//var inc_record = new GlideRecord("sn_si_incident");
ip_block.u_sec_ticket = current.sys_id;
ip_block.state='-1';
ip_block.u_ip_geo_loc=current.location;
ip_block.u_ip_lob_target=current.u_lob_target;
var sysID = ip_block.insert();
current.u_ip_blocker_reqnumber = sysID;
var mySysID = current.update();

gs.addInfoMessage("IP Block Request " + ip_block.number + " created");
action.setRedirectURL(ip_block);
action.setReturnURL(current);

 

 

I want the same to be on my Analyst workspace as a button. Any advise.?

6 REPLIES 6

Michael Fry1
Kilo Patron

Check out the module: UX Form Action

Create an action type of UI Action and then add your UI action you created. Look at baseline examples.

Thanks @Michael Fry1 ,

 

I have already created one. I'm not really sure on how to add this button there on my workspace. In analyst workspace, there is a separate module where we can create form UI actions.. it can either be dialog based or server side actions. 

Did you go look at the module: UX Form Action? I'm not asking you to create another UI Action. I'm asking you to create a UX Form Action with type UI Action and using your UI Action,

Yes, @Michael Fry1 ,

SwethaM_0-1683207720234.png

I have created a UX form action with the type UI action and have used my UI action for the same.