Maximo

Maximo

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

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

    Posted 19 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 16 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
    ------------------------------



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

    Posted 12 days ago

    Hello Bartoz,
    Thank you for your response.
    I attempted to replicate the behavior of the navigateToAssetDetails method from the TechMobile application. Since the loadApp function wasn't available in the AssetManager application, I added the loadApp definition there.
    However, I'm facing an issue: I'm unable to open the CreateWO page of the TechMobile application. Although I've specified the page name as 'createwo' in the context, it still navigates to the Schedule page of the TechMobile app.
    I suspect that the context may be expecting an href attribute to correctly navigate to the CreateWO page for a new work order, but I haven't been able to identify how to generate or retrieve the appropriate href for this.
    Could you please share any pointers or guidance in this direction?



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