Maximo

Maximo

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

 View Only
  • 1.  MAF Mobile - Simple javacustomizations.js examples for customization

    Posted Fri August 04, 2023 02:12 PM

    I am looking for a simple examples for customization at the level of "Hello world".

    The manual i found on the internet and on this forum is of the level "If you understand this example, than you don't need this manual". ;)

    For now I managed the alert("Hello world") through a button, but setting a description to "Hello World" seems to be impossible.

    I am looking for a KISS example in the AppCustomizations.js.

    Something like mbo.setValue("DESCRIPTION","Hello world"), which is automation script ofcourse.

    Does anyone have an example or is there somekind quick reference card?



    ------------------------------
    Vincent Wanders
    ------------------------------



  • 2.  RE: MAF Mobile - Simple javacustomizations.js examples for customization

    Posted Mon November 13, 2023 04:02 AM
    Edited by Bartosz Marchewka Mon November 13, 2023 04:03 AM

    Hi Vincent,

    It looks like starting from MAF v8.11 (don't recognise it in previous versions) IBM prepared "Developer Documentation" web page that is embedded in MAF docker image.

    MAF -> Help -> Developer Documentation



    ------------------------------
    Bartosz Marchewka
    ------------------------------



  • 3.  RE: MAF Mobile - Simple javacustomizations.js examples for customization

    Posted Thu November 16, 2023 02:19 AM

    Hi Vincent,

    I've written 3 blogs about Mobile customisations. It may help you to start. Here is the 1st one: https://www.bpdzenith.com/the-bpd-blog/maximo-mobile-customisation

    For this simple setValue, here is a code to do what you want.

    #AppCustomizations.js
    class AppCustomizations {
      applicationInitialized(app) {
         this.app = app;
      }
      
     pageResumed(page, app) {
        this.app = app;
        this.page = page;
     }
    
     myCustomButton() {
          // get your datasource
          let mainDs = this.page.getMainDatasource();
          mainDs.item.description = 'Hello World!';
     }
    }

    Add this myCustomButton to your Button "Set Description" on the app.xml using on-click="myCustomButton".

    <button on-click="myCustomButton"  [...] />


    ------------------------------
    Maycon Belfort
    Consultant
    BPD Zenith
    Melbourne
    Australia
    ------------------------------



  • 4.  RE: MAF Mobile - Simple javacustomizations.js examples for customization

    Posted Thu April 17, 2025 10:56 AM

    Hi
    Your link is not opening
    https://www.bpdzenith.com/the-bpd-blog/maximo-mobile-customisation



    ------------------------------
    Rana Ahmed Naazir
    ------------------------------



  • 5.  RE: MAF Mobile - Simple javacustomizations.js examples for customization

    Posted Tue April 22, 2025 11:54 PM
    Hi Rana,

    You can find it here.

    https://moremaximo.com/blogs/maycon-belfort/2025/04/22/maximo-mobile-customisation?CommunityKey=784e8753-d7af-4281-8463-e86f3b5d7076

    And here are other blog posts for your reference.
    https://moremaximo.com/blogs/maycon-belfort/2025/04/22/maximo-mobile-event-emitter?CommunityKey=784e8753-d7af-4281-8463-e86f3b5d7076

    https://moremaximo.com/blogs/maycon-belfort/2025/04/22/changing-status-in-maximo-mobile?CommunityKey=784e8753-d7af-4281-8463-e86f3b5d7076

    Kind regards,
    Maycon Belfort