Maximo Open Forum

 View Only
Expand all | Collapse all

Need to enable/disable "Move/Modify Asset" option based on asset status

  • 1.  Need to enable/disable "Move/Modify Asset" option based on asset status

    Posted 05-06-2022 01:30
    Hello,

    We have a requirement, where in we want to enable/disable "Move/Modify Asset" option based on asset status. So if an asset is operating, users who have access to this option, should not be able use it. For this, we created a condition and associated to required sigoption. This condition works fine in Main tab as one specific MBO is selected. We are facing issue in list tab.

    In list tab, maximo considers only the status of highlighted row. If that asset is in "not operating" status and rest of the assets are "operating", it still allows user to use "Move/Modify Asset" option. Also, if "Select Record" is used to select specific records, maximo allows the user to use this action irrespective of asset status.

    We don't want to remove this from list tab as this takes out the option to "Move/Modify Asset" in bulk.

    I tried implementing the solution mentioned in this link: How to Control Mass status change within the List Tab
    Ibm remove preview
    How to Control Mass status change within the List Tab
    Is it possible to hide the change status icon from the list tab?
    View this on Ibm >
    however, this is not working and creating issues.

    Any help would be highly appreciated.

    Thanks & Regards.
    #Assets
    #Customizations

    ------------------------------
    Amol Pardeshi
    Sedin Technologies, India
    ------------------------------


  • 2.  RE: Need to enable/disable "Move/Modify Asset" option based on asset status

    Posted 05-06-2022 02:58
    Hi Amol,

    Did you try putting validation on selected records before the move/modify asset action actually happens to check if none of the statuses is Not Operating in the selected list and then only you allow the move/modify asset action.  We can write a custom action script and call this script in place of OOB Move/Modify Action -> this script will check if all status in the list tab or selected records in the list tab are not of status which you don't want i.e. Not Operating. If the condition is true then you call the OOB method of Move/Modify asset otherwise show an error message to the user and not allow move/modify.

    You can create a new custom action and hide the OOB action if you want for this.

    curapp = service.webclientsession().getCurrentApp()
    mboSet = curapp.getResultsBean().getMbo().getThisMboSet()

    traverse this mboset and check for status of each mbo.

    Below code can be used to get only selected records-

    selectRecords = mboSet.getSelection()


    Thanks


    ------------------------------
    Prashant Sharma
    EAM360
    Connect with me @ https://www.linkedin.com/in/psharmamaximo/

    #IBM Champion 2022
    ------------------------------