Saving a Work Order from an Automation Script in Maximo - automation

I am trying to save a Work Order in Maximo through an automation script. My script triggers from an action launch point using the Assignment Table as the object. In my case a button labeled start under the assignments tab in work order is calling the script which is starting the assignment record and moving the status to INPRG, but then it does not save the Work Order itself. The user would have to click the start button, then click the save icon on the Work Order currently. I am trying to get the button to save the Work Order from the script, so they will not need to manually click save after hitting the start button.

I was able to get the result I needed by using getOwner() till I was at the Work Order level, then using getThisMboSet().save() from the owner. My button is now doing the things I need it to do to the Assignment record and saving the Work Order it belongs to when clicked.

Related

Adding a "New Button" option on Access form

Please forgive me if this question is too vague or extensive. I have limited experience with Access, SQL, and VBA and have a problem at work that I just can't solve. I'm trying to add a "new button" button to the user interface on our Access database.
I would like it to maybe bring up another form that allows you to input a query you want to make into a quick link on the home page. Obviously this would only be accessible to certain users but I can handle that part.
I don't necessarily need the code written, just an idea of where to start. So far all I've been able to do is hard code a new query or link into a button each team I want to make one. I want this process to be simplified so that anybody can make a button even if they don't know how to use Access very well.
Again, any help would be greatly appreciated and feel free to tell me to get lost if this is too vast or general a question.
I would like it to maybe bring up another form that allows you to input a query
The above seems very confusing. You are asking how a form can be used or launched or displayed to allow the user to add a new record. Then you toss in this VERY unrelated concept of some query? What does some query have to do with adding a new record?
If you want to add a new record, and you are in a form that is displaying current records, then behind the button, you can execute this line of code to jump to a new record ready for data entry:
DoCmd.GoToRecord , , acNewRec
So, that is one line of code.
If you want to launch an existing form and have it start out with a new clean fresh record, then use this:
DoCmd.OpenForm "frmCustomers", , , , acFormAdd
The above will launch the given from in "add mode" and thus you are again on a new fresh record ready for data entry.
The issue(s) of some query etc. for the user What does that have to do with wanting the user to add a new record? So that part does not seem to apply to the basic idea of presenting a form with a new record which allows the user to add that record in question.
You have to explain what all the hub bub about this magic query issue but to jump a form to a new record for the user? Just use the first line of code behind a button.
And if you need to launch a form in "add mode", then use the 2nd example one line of code behind the button in question. None of this has really anything to do with some "query" in regards to you wanting the user to add a new record. You can expand on what you mean by some user query, but you have several options to jump an existing form to a new record, or launch a form in "add mode" to allow adding of a record. In these cases, you don't need nor want to write or deal with some SQL query.

Issues saving current record from custom dialog

I am currently developing a custom app in Maximo Asset Management where i have form and an empty DataTable that have a button, when user clicks this button, a custom dialog appears and user can select a related record from this dialog on a data table to process it by clicking a button to launch an action script. The problem i am facing is when system finish process the record, it saves correctly, but application shows the first record of table and not the current saved record, so user gets confused when this happens.
Let me put an example, lets suppose the first record id of my custom table is CC1055 and the current saved generates as CC1156, when i close dialog after process record with automation script custom logic, the systems shows the record with id CC1055 and not the new saved record CC1156, postdata: I use Maximo 7.5.0.9
I had the same issue. The reason Maximo goes to the first record in the table is that it does not know which record to display after opening and closing your new custom dialog and saving the record.
The simplest solution is to add savemode="ONLOADUNLOAD" in your custom dialog tag in xml.
This will save the record before you open the dialog and Maximo will know to which record to return after closing it.

When I am creating record and saving manually record number is generated but record number is not generated using selinium automation

The task is that when I create a record and click save then verify using automation that a record number is generated automatically.
However when I am executing this task manually and saving it record number is generated but when I am creating the same record with same fields using automation then record number is not generated.
Ways I tried:
I have tried pausing selenium after clicking save button but I am not able to figure out the reason.
I have checked that user is the same manually and through automation.
What else I could be the reason
i believe you have to replicate user action while saving the record instead of performing an action on DOM. you can give a try using any of the below options
1) Actions Class
2)Robot Class
3)Sikuli

Oracle Apex 5 Modal Call

I created 2 interactive reports to work as a master detail. In the master, I have a link that will refresh the detail report with records for the master.
I have a create detail record button that will call a page as a modal window and then save. Everything works correctly except the Create detail button does not refresh with the master record id. The button is suppose to set the page item on the modal for the master record id.
It looks like the button is built when the original page is built and never changes. I have a dynamic action that sets an item on the main with the master record ID and I assumed that the button would use that, but it never refreshes with it.
How do I get the button to refresh when I change the item that holds the master record id? I can try and build it other ways but the I can not get the checksum to work and it will throw an error when the modal opens.
Here is the javascript call attached to the onclick of the button:
apex.navigation.dialog('f?p=810:6010:14381566697413::NO::P6010_TRACK_SERNO,P6010_FORM_ACTION:90,CREATE\u0026p_dialog_cs=z9T5rK-dt186xh83jq4Dy4d2vumFtU_Fj1a0Opm8M4gyGXp5eQ89zcx3KvDE84L_63s_4583R7WGcYhAHXyX1Q',
{title:'Level',height:'500',width:'720',maxWidth:'960',modal:true,dialog:null},
't-Dialog--standard',
$('#createLevel'));
I am just trying to change the P6010_TRACK_SERNO item from 90 to 95 as an example
In these cases I usually set the value of the item not on button click, but on initializing the called page.
For example, you could copy the item value via PL/SQL in Pre-Rendering like this:
:P6010_TRACK_SERNO := :P0000_MASTER_ID;
Is that an option?

Setting up recycle bin functionality in Archer GRC

When deleting records within the platform, this action is not reversible via the front end. Is there a way to allow users to remove a record from their view without actually deleting the record?
You can simulate recycle bin functionality within Archer GRC by adding a record permission field that grants read access to "Everyone". If read access is no longer required then an editor of the record can go in and change "Everyone" to a group called "Recycle Bin."
Please note that if there are other record permission fields in the application, users or groups may still have access if they are selected in those fields. Perhaps You can set up a dropdown status field for the user to select "Recycle Bin" and use this condition for automatic record permissions to revoke permission to the record depending on the requirements or workflow of the application.
Solution shared by Igritte might be somewhat confusing for end users.
End user will see greyed out "Delete" button in the top toolbar, but he has to select "Recycle Bin" in the form. This solution was not accepted by my business owner at some point.
As a work around for "Soft delete", I wrote a custom object overriding "Delete" button functionality.
1. User doesn't have delete access to the record, so JavaScript code will make "Delete" button look like active and available.
2. Once the button is clicked, custom object will populate value in the
hidden value list and simulate the click on the "Save" button.
Update: Note that Custom object needs to hide the value list first once the page is loaded. Here you will need to use a JavaScript and do the following: [a] locate the value list DOM object and [b] set display attribute to none. I used jQuery library to do both. This way your value list is not displayed, but you still can use it to control data driven events.
3. With hidden value populated and submitted, record permission will hide this record from the end user.
Note that custom object hides one value list on the layout as well.
If for some reason JavaScript doesn't load properly, user simply will not be able to click on the grayed out "Delete" button.
Update: Hidden value list can be populated by custom object using JavaScript code as well. You need to identify the form tag "input" in HTML code of the page and set attribute "value" to the desired state. I used jQuery library to do this as well.
I have this solution in production working fine with IE11, FF and Chrome.
I can't share the code, but with WC3Schools JavaScript guides and 4 hours you can write and test it yourself with very little JavaScript skills.
Sometimes you have to use custom objects when you want to get a user-friendly solution of not available functionality.
Good luck!