Maximo

Expand all | Collapse all

Automation script for duplicate record and then open it directly

  • 1.  Automation script for duplicate record and then open it directly

    Posted 15 days ago
    Edited by Blaz Rakar 15 days ago
    Hello,

    I have one requirement that I must create automation script which one will be duplicate created record where I will copy to duplicated record 3 values/attributtes. 

    I have one idea that I will achieve this after record was created user will get pop up dialog where he decides If he wants duplicate record or not. He will click push button "COPY RECORD" and there I created automation script with objectname and action duplicate --> SR.DUPLICATE.

    The problem is, that if I duplicate record how could I make that after click I will duplicate record and at the same time open this duplicated record where user could insert other values? I have to said that this duplicated record is not saved yet is this possible?

    Anyone have any idea?

    ------------------------------
    Blaz Rakar
    ------------------------------


  • 2.  RE: Automation script for duplicate record and then open it directly

    Posted 13 days ago
    I am not sure you can do what you want here.  But, perhaps you can fill in some more details before we quit trying.   Is this a self service user (I ask because the power app duplicate does bring the user to the unsaved record)?  If it is self service, do you envision the user going to the Create SR page with the data filled in from the original record?

    Steve

    ------------------------------
    Steve Hauptman
    ------------------------------



  • 3.  RE: Automation script for duplicate record and then open it directly

    Posted 13 days ago
    Steve's question around whether this is in the self-service app or not is critical.

    To expand on what he's saying, your script on SR.DUPLICATE is already in the right place to handle copying the values over. What you're looking for is that a user clicks a button in your app and that causes it to duplicate the record in question. If you're in a standard power app (such as SR), you already have the event you need to duplicate and move to that record out of the box. For example, if you drag a push button control on your SR record and set the event to DUPLICATE (and the signature option to DUPLICATE to hide the button when someone doesn't have security access) when a user clicks the button it will duplicate the record and automatically open it.



    ------------------------------
    Steven Shull
    ------------------------------



  • 4.  RE: Automation script for duplicate record and then open it directly

    Posted 12 days ago
    Edited by Blaz Rakar 12 days ago
    Okay I understand what are you saying. So application is mobile, so when I click duplicate in my application in my Language "Kopiraj zahtevek". I see this up here, so the record was duplicated. But Application dont open my record its stays at this window..  New(duplicated) record must not be saved yet, I wanna just copy 3 values from previous record which in this case was already saved.


    ------------------------------
    Blaz Rakar
    ------------------------------



  • 5.  RE: Automation script for duplicate record and then open it directly

    Posted 12 days ago
    The method I showed would not automatically save the new record in a Power App. It duplicates the record and moves to that record to allow the user to edit while also being able to discard.

    Your app looks to be a custom version of the Create Service Request (CREATESR) app which is a special type of app. Most apps in Maximo are called Power Apps. For example, SR where you have a list tab, main tab, and then subsequent tabs of information. But there are two other types of apps: Single Page App, like Labor Reporting, and Self Service, like the Create Service Request app. These function differently than a traditional Power App. 

    You might be able to still do it in the Self Service app. If you can, it's probably going to be more involved. A push button can invoke an automation script and if you're on 7.6.1.X you can interact with the UI bean classes. You might be able to duplicate the record and move to the record in the bean class but I don't know without looking at the code for the start center apps. Can you confirm you're on 7.6.1.X? If you're on 7.6.0.X the hook for the UI for automation scripts doesn't exist and you would need custom java to do.

    ------------------------------
    Steven Shull
    ------------------------------



  • 6.  RE: Automation script for duplicate record and then open it directly

    Posted 12 days ago
    Steven thanks for your answer, so I have a problem, because our version of Maximo is 7.6.0.10. Next year we are going to the newest version of Maximo.

    ------------------------------
    Blaz Rakar
    ------------------------------