UI action Button to create Workorder

Irfan53
Kilo Contributor

Hi everyone,

I have a usecase where I need button to create work order. I see we have context menu to create work order, can I make changes to it directly and make it button and make customization on it where when I click that button I get message onclick with yes or no.

Please suggest

 

 

3 REPLIES 3

Mohammed8
Giga Sage

Hi @Irfan53 

Instead of directly making changes to OOTB provided, its always recommended to make a copy and work on it. So go to OOTB create work order UI action, insert and stay and make this copy UI action as active and check button option.  Check button and uncheck form context menu option

 

Mohammed8_0-1765917877738.png

 

If you want message on-click of button, select client check box and write script for on-click() function similar like this. and on server side implement your work order logic or copy from OOTB UI action:

In my example case my function is confirmAndRun() so:

 

Mohammed8_2-1765918352460.png

 

 

Mohammed8_1-1765918087719.png

 

If you find this answer useful, please mark it as solution accepted/helpful.

 

Regards,

Mohammed Zakir

Thanks Mohammed8,

I followed first part of your solution. Instead of your script I made use of UI page as dialog box. It works fine. But when mandatory is empty I don't want this dialog box to pop up. I struggle with client script, can you please suggest approach. I need a info message on native form if mandatory is empty else dialog box should pop up.

 

Thanks

Hi @Irfan53 

Good to know but without screenshots or scripts it will be tough to help or suggest you. 

You can close see this thread and raise a new question with proper screenshot / script and description.

 

Regards,

Mohammed Zakir