Maximo

 View Only
  • 1.  Maxmo Mobile - Open Change Status Sliding Drawer from workOrderDetails page

    Posted 7 days ago

    I have a requirement to open a custom confirmation dialog box when user taps on the Start Work button in Techmobile app. There are 2 options, Yes and No. 

    Tapping on Yes - will allow the user to start the work - which I have implemented. 

    Tapping on No  - will close the confirmation dialog box and open the Change Status sliding drawer.

    In my appCustomizations.js - I tried calling "openWoDtlChangeStatusDialog" from WorkOrderDetailsController.js as below. But, I received error "Cannot read properties of undefined (reading 'serviceaddress')"

    noResponse(event) {
        this.page.findDialog('dialog_ConfirmationOnStartWork')?.closeDialog();
        //Call Status page
        this.page.callController('openWoDtlChangeStatusDialog',event);
    }

    I then tried to call the "openChangeStatusDialog" method from the schedulePage controller but received other errors. I haven't received any success so far. 

    Could someone please guide on this?

    Thanks.



    ------------------------------
    maximo User
    ------------------------------


  • 2.  RE: Maxmo Mobile - Open Change Status Sliding Drawer from workOrderDetails page
    Best Answer

    Posted 5 days ago

    Hi,

    if I understood your requirement clearly, then this is what you need - 

    <dialog id="xxMsgDialog_startTimer" on-primary-action="onStartTimerYes" on-primary-action-arg="{{'item': woDetailResource.item, 'datasource': woDetailResource.datasource, 'worktype':'work','action': 'start'}}" on-secondary-action="onStartTimerNo" on-secondary-action-arg="{{'item': woDetailResource.item, 'datasource': 'woDetailResource', 'worktype':'work','action': 'start', 'page':page, 'referencePage':'workOrderDetails'}}" primary-action-text="Yes" secondary-action-text="No" title="Confirm Status Change">
              <label label="Are you sure you want to start Timer?" wrap="true" id="a1_kkxe_"/>

     onStartTimerNo(evt){
       let woScheduleController = this.app.findPage("schedule").controllers[0];  
       woScheduleController.openChangeStatusDialog(evt);
     }


    ------------------------------
    Santosh Bade
    ------------------------------



  • 3.  RE: Maxmo Mobile - Open Change Status Sliding Drawer from workOrderDetails page

    Posted 5 days ago

    Thanks Santosh. It worked. 

    Parameter 'referencePage':'workOrderDetails' that you have used here, is critical.

    Thank you very much.



    ------------------------------
    maximo User
    ------------------------------