Maximo

Maximo

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

 View Only
Expand all | Collapse all

Automatically Navigate User to newly created Work Order through Automation Script

  • 1.  Automatically Navigate User to newly created Work Order through Automation Script

    Posted Mon September 23, 2024 10:55 PM

    Hi Everyone!

    I am working on a functionality of creating a work order on click of a button in Operator Log application and also open this new work order record in the Work Order application. 

    I am not able to navigate to the Work Order application and open this new record from the automation script.

    I have tried both the service.openURL and webclientsession.gotoApplink methods to achieve this functionality but its not working.

    When I use the service.openURL method it gives me Access Denied error on the new browser window.

    I would appreciate if you could share some ideas.

    Thank you!



    ------------------------------
    Gagan Deep Bansal Director
    ABC
    Calgary AB
    ------------------------------


  • 2.  RE: Automatically Navigate User to newly created Work Order through Automation Script

    Posted Tue September 24, 2024 01:40 AM

    Hello! 

    Are You using some attribute, that opens link in new window? Not new tab?

    Check this https://community.ibm.com/community/user/asset-facilities/discussion/invoke-external-url-from-automation-script

    I think, there could be answers.



    ------------------------------
    Juris Flugins
    ------------------------------



  • 3.  RE: Automatically Navigate User to newly created Work Order through Automation Script

    Posted Tue September 24, 2024 11:54 AM

    Hi Juris,

    Thank you for responding to my query!

    Yes i did looked into that article but its not helpful as it talks about invoking external URL's from Maximo and my problem is related to navigating withing Maximo by maintaining user session.

    I am trying to open the Work Order application using the Go To option on the WONUM field. I am fine either ways if its open a new browser window or takes the user to the Work Order application on the same window.



    ------------------------------
    Gagan Deep Bansal Director
    ABC
    Calgary AB
    ------------------------------



  • 4.  RE: Automatically Navigate User to newly created Work Order through Automation Script

    Posted Wed September 25, 2024 01:41 PM

    I'm quite sure openUrl should work if used like this. Providing in case you didnt use the parameters the same way.

    service.openURL("https://google.com",True)

    Alternatively you can take a look at this sample:

    newEvent = WebClientEvent("changeapp", appinstance.getId(), "wotrack", None, None, None, UID, session);
    session.queueEvent(newEvent);



    ------------------------------
    Niels Boom
    ------------------------------



  • 5.  RE: Automatically Navigate User to newly created Work Order through Automation Script

    Posted Tue October 01, 2024 10:31 AM

    Thank you Niels! That did help navigate to the Work Order app but it does not create a Return link to come back to the original application i.e. Operator Log.

    Do you know a way to have the Return link enabled?



    ------------------------------
    Gagan Deep Bansal Director
    ABC
    Calgary AB
    ------------------------------



  • 6.  RE: Automatically Navigate User to newly created Work Order through Automation Script

    Posted Tue October 01, 2024 10:53 AM

    Never done that so I'm not sure. If you are using the WebClientEvent approach you might be able to with the gotoapp-event and the  applinkreturn-event

    AppInstance prevApp = this.clientSession.getPreviousApp();

    WebClientEvent("applinkreturn", prevApp.getId(), null, this.clientSession); 

    https://moremaximo.com/discussion/does-anyone-know-if-there-are-is-a-list-of-webclientevents-documented



    ------------------------------
    ---
    Niels Boom
    ibmcontact@nielsboom.nl
    ------------------------------



  • 7.  RE: Automatically Navigate User to newly created Work Order through Automation Script

    Posted Wed October 02, 2024 12:07 PM

    Thank you for providing this info Niels.

    I tried the applinkreturn event but it did not work. It failed on the getPreviousApp.getId().

    Below are the two lines of code in my Autoscript. The first line works fine that takes me to the Work Order app. But the second line for applinkreturn throws an error that None type object has no attribute getId(). So its not able to get the Previous App instance.

    service.webclientsession().queueEvent(WebClientEvent("changeapp", service.webclientsession().getCurrentApp().getId(), "tnomntwo", None, None, None, woMbo.getUniqueIDValue(), service.webclientsession()))

    service.webclientsession().queueEvent(WebClientEvent("applinkreturn", service.webclientsession().getPreviousApp().getId(), None, service.webclientsession()))



    ------------------------------
    Gagan Deep Bansal Director
    ABC
    Calgary AB
    ------------------------------



  • 8.  RE: Automatically Navigate User to newly created Work Order through Automation Script

    Posted Sun September 29, 2024 11:57 PM

    Is this attribute webclient.multibrowsersupport set to true?

    https://www.ibm.com/support/pages/node/390103

    But first You wrote about script, now about standard GoTo menu. What and where are You trying to achieve, how far You are, and at which step isn't happening what You need?



    ------------------------------
    Juris Flugins
    ------------------------------



  • 9.  RE: Automatically Navigate User to newly created Work Order through Automation Script

    Posted Tue October 01, 2024 10:33 AM

    Thank you for your response Juris!

    I am able to go to the Work Order application but now i am missing the Return link to come back to the original application i.e. Operator Log. Do you know a way to achieve that using the Automation Script?



    ------------------------------
    Gagan Deep Bansal Director
    ABC
    Calgary AB
    ------------------------------



  • 10.  RE: Automatically Navigate User to newly created Work Order through Automation Script

    Posted Wed October 02, 2024 12:11 PM

    Hi Juris,

    Yes the multibrowsersupport property is set to true and we have been using multiple tabs for a while without problem.



    ------------------------------
    Gagan Deep Bansal Director
    ABC
    Calgary AB
    ------------------------------