Home Analyst Portal
Options

How to disable Save and Apply buttons for regular end user on custom Change Request form?

Xiaoqian_LiXiaoqian_Li Customer IT Monkey ✭
We have a custom Change Request form built in Service Manager Portal. Is there a way to disable the Save and Apply buttons for the regular end user? Because we only allow certain groups to be able to update the CR info in Cireson Portal. Thank you in advance for your input.

Best Answer

  • Options
    john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    Answer ✓
    You can remove the Save and Apply buttons for end users by adding this code to your custom.js file:

    app.custom.formTasks.add('ChangeRequest',null, function(formObj, viewModel){&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; formObj.boundReady(function () {<br>&nbsp;&nbsp;&nbsp; if (!session.user.Analyst)<br>&nbsp;&nbsp;&nbsp;&nbsp; $("#drawer-taskbar > button:nth-child(-n+2)").hide();&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp; })<br>});

Answers

  • Options
    Joe_BurrowsJoe_Burrows Cireson Devops Super IT Monkey ✭✭✭✭✭
    Rather then remove the disable or apply button you could create a custom form that disables the fields that way the users are not able to edit. 
    Then just target your custom form to whichever group makes the most sense.

    More information on custom forms can be found in the below KB:
    https://support.cireson.com/KnowledgeBase/View/51

    Cheers
    Joe
  • Options
    john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    Answer ✓
    You can remove the Save and Apply buttons for end users by adding this code to your custom.js file:

    app.custom.formTasks.add('ChangeRequest',null, function(formObj, viewModel){&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; formObj.boundReady(function () {<br>&nbsp;&nbsp;&nbsp; if (!session.user.Analyst)<br>&nbsp;&nbsp;&nbsp;&nbsp; $("#drawer-taskbar > button:nth-child(-n+2)").hide();&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp; })<br>});
  • Options
    Xiaoqian_LiXiaoqian_Li Customer IT Monkey ✭
    Thank you for looking into this. The code works perfect and that is what we need exactly.
This discussion has been closed.