How do I see which code is executed when clicking the Start button on the AX 2012 R2 ProdTable form? - dynamics-ax-2012

ProdTable form, Production Order tab, Process group, Start.
Looking through the form designer, I can find the MenuItem in the DesignList, but the methods are empty. Where can I see which code is being executed?

Right click the button in the Design List, and click Properties
Note the properties MenuItemType (Action) & MenuItemName
(ProdStartUpAction)
Back in the AOT, browse to Menu Items and expand Action
Find ProdStartUpAction in the list
Right click ProdStartUpAction and click Properties
Note the properties ObjectType (Class) and Object (ProdMultiSatrtUp)
Back in the AOT, browse to Classes
Expand the class ProdMultiStartUp - the method the menu item runs is
called Main

Related

Want to re-instantiate a component when navigating to same aux route

I have a list of items with Actions drop-down for each item in the left-section of page. I also have a right rail which displays a different component based on action type selected. I'm using aux-route to accomplish this.
One of the Action the user can take is "edit" where in a form is displayed to edit the metadata of the list item. While editing, user can click on + button next to some of the input field to add another input field dynamically.
Now my problem is, when the edit-form is open for a list item and I click edit on another item in the list, I wanted my edit-component to be re-instantiated.
Because the aux-route is same for all the list items for edit-action, edit-view is not instantiated once again. Is there a way to achieve it?
Right now fixed it with RouteReuseStrategy

Drop dialog on a list page not disappearing automatically

When I add a drop-dialog to a list page, the drop dialog drops down when I click on it, but does not disappear when I click somewhere else.
I am trying to add my own drop-dialog, but I can reproduce this issue with standard Dynamics AX objects. I guess I am just missing some property on an object, but I just cannot figure out which one.
If you want to reproduce my problem in order to solve it, do the following:
Create a new Form. (Form 1)
Change the FormTemplate property to ListPage (Click on Yes)
Add the query MainAccountListPage to the DataSources
Create an ActionPanTab.
Add a Drop-dialog button with the menu item MainAccountListPageBalanceParameters.
Save and open the new List page by right clicking and choosing open. (or open the menu item)
In my case, when I click on Parameters, the drop dialog drops down. When I then click outside the drop-dialog, it disappears as it should.
Create a new display menu item. Set the object to the new list page (Form 1)
Drag the Menu item to any menu. I added mine to General ledger (Common)
Restore, open new workspace. Click on the new menu item in the general ledger menu.
Click on “parameters” and click outside the drop dialog.
When I do this the drop dialog does not disappear again. You can see this same drop dialog working fine on the Main Accounts list page. I have tried changing properties on both menu items, on the menu, on the form etc. I have tried different drop dialogs and different list pages. It always works on the details page and when opened from the AOT.
Am I missing a property? Is the entire way I am adding the drop dialog wrong?
The answer to the above example is.. add the MainAccountDetailPart Form part to the list page's (Form1) Parts.
With my other example, EcoResProductPerCompanyListPage, I had to add the EcoResProductVariantsPerCompanyFactBox to Parts.
I have no idea why this is, but adding a part to a list page fixes the drop dialogs. For example, adding MainAccountDetailPart Form part to a new list page not only fixes the MainAccountListPageBalanceParameters in my example, but it also fixes any other drop dialog that previously did not want to close. Removing the part the breaks all the drop dialogs in the list page again.
Thanks, FH-Inway, for the suggestion, I would have never have found the answer without your method. The solution really surprised me!

Retrieve button name in Oracle Forms Builder after right click

I'm using Oracle Forms Builder. I have a button which has a pop-up menu attached to it. I need to retrieve the name of that button into a text_item after the user right clicks on it and selects one of the pop-up option.
Use :SYSTEM.TRIGGER_ITEM.
........
If you need the name of the button clicked inside a trigger like when-button-pressed, then you can use the system parameter :system.trigger_item this will give you the item that fired the trigger. So if you use that in the when-button-pressed trigger you will get the item that pressed the button.
If you start another application instead of just a popup or so and you need the item in that application then you can set a global or create a parameterlist with the itemname and then you can refer to that in the application you just started.

How to identify the viewcontroller is clicked from More Tab or Separate tab in UITabBarController?

I have the navigationcontroller based viewcontroller and I overriding the root view controller navigation bar back button in to my custom segment control with different purpose. This navigation controller is placed one of the separate tab in the uitabbarcontroller. If this is used as the separate tab bar then no problem.
But if i use this navigationcontroller inside the more option in tabbarcontroller i am not able to come back to the more option list because of backbutton is overridden in my navigationcontroller.
My idea is add one back button only if my navigationcontroller is used more option tab otherwise i need to hidden the back button.
Please help me in this issue?
You can check if a view controller is in the 'more' section as follows:
BOOL isOnMoreNavigationController = [tabBarController.moreNavigationController.viewControllers containsObject:myViewController.navigationController];
From a UI consistency perspective it might be better to always show the back button in its standard position and move your custom buttons to some other place.

jQuery dialog serving multiple button's click event handller

I have a scenario where...
1.) Have created a div with a dropdown list and ok, cancel button
2.) On document ready - registering div created on step 1 into a jQuery dialog
3.) on a javascript button click - I am opening this dialog box.
4.) Now, the problem is - the jQuery dialogbox which I have created, needs to be used by other button clicks as well on same page. Now, my div's (which is a dialog at runtime using jQuery) ok button click is already engaged with a javascript function (button1 click) and I can not associate other button's click events with it - thus stuck up here and have no clues or hit to resolve this.
Anyone have faced this issue in asp.net, jquery earlier? Can someone provide a guidance?
Why you cant associate another event?
buttons will have different id. Is it?
$('#button1').click(function() {
alert('Handler for button 1 .click() called.');
});
$('#button2').click(function() {
alert('Handler for button 2 .click() called.');
});
Is this not possible in your case.?
Options:
1) disassociate the click handler when the function opens the div, then later in the function of opening the div associate a click handler to the button.
2) create multiple buttons toggle them all hidden, associate the click handler to each button you want. When the div is opened do a check to see which button to toggle to visible.
3) create no buttons but have a function create the button on the fly. When the div is opened, create the button for that div by calling the function and passing in a code telling it which button to open and what to associate to the click handler (this can be stored in an array and all that is passed in is the key).
Depending on the application, I have used all of these methods. The last one can have a twist that allows it to call an ajax server based application to get the button text and functionality (stored in a database), this saves you from having to load an array with button data, and also allows for easier expansion of the application.

Resources