Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
Expand all | Collapse all

Maximo Mobile: Navigate from Asset manager to Create WO screen of Technician application

  • 1.  Maximo Mobile: Navigate from Asset manager to Create WO screen of Technician application

    Posted 4 days ago

    Hi,
    I have a requirement where I need to navigate from the Asset Manager application to the Create Work Order screen of the Technician application, with some fields pre-populated.
    Specifically, the Asset and Location should be pre-filled based on the asset from which the "Create Work Order" option was selected.
    I'm exploring ways to achieve this navigation, and any guidance or pointers would be greatly appreciated.



    ------------------------------
    Meghana Siriveli
    ------------------------------


  • 2.  RE: Maximo Mobile: Navigate from Asset manager to Create WO screen of Technician application

    Posted 2 days ago

    Hi Meghana,

    If may I suggest you something you can start with analysing how similar thing was done by IBM. As an example, from TECHMOBILE application "Work Order Details" view it's possible to navigate to ASSETMOBILE app (please see the section "Asset and Location").

    IBM added navigateToAssetDetails method to on-click property in button component. This is how method definition looks like:

    /**
       * Method to navigate to asset details of asset app
       */
      async navigateToAssetDetails() {
        this.page.state.loadAssetData = true;
        const woDetailResource = this.app.findDatasource('woDetailResource');
    
        try {
          this.page.state.loadAssetData = false;
          //istanbul ignore else
    
          let context = {
            page: 'assetDetails',
            assetnum: woDetailResource.item.assetnum,
            siteid: woDetailResource.item.siteid,
            href: this.page.state.currentWOAssetHref,
          };
          this.app.callController('loadApp', {
            appName: this.app.state.appnames.assetmobile,
            context,
          });
    
        } catch {
        } finally {
          this.page.state.loadAssetData = false;
        }
      }

    I think in your scenario you will need to set context (page to createwo, assetnum and location) and appName to TECHMOBILE.

    To populate default data in New Work Order please review WorkOrderCreateController.js

    I hope this will help you to move forward. Good luck.



    ------------------------------
    Bartosz Marchewka
    IBM Maximo Consultant
    AFRY
    ------------------------------