dynamics ax 2009 landing page - dynamics-ax-2009

I would like to redirect some of my users to a specific form in aot when they open dynamics ax 2009. What is the best way to that? Today, they directly go to the role center page.
Thanks

You're asking 2 questions here: how to open a specific form from the code, and how to get something done automatically when AX is opened.
I don't have an access to AX at this moment but the following code should help you with the first question.
FormRun formRun;
;
formRun = new MenuFunction(menuitemdisplaystr(___FormMenuItemName___), MenuItemType::Display).create(new Args(this));
formRun.init();
formRun.run();
formRun.detach();
As to the second question, you just need to add your code to method StartupPost of either Application or Info class.

Firstly you have to create a menu item for the form.
Then in the Info class, modify the startupPost() method by calling the menu item:
new MenuFunction(menuitemDisplayStr(YourMenuItem), MenuItemType::Display).run();

Related

what is the best way to switch from or exit from formFlow to Dialog in Bot Framework

Here is my Basic Code
The formFlow works fine and after checking the if condition ,it should go to the else part ,which it does, but in the else part the wrote this line of code
await Conversation.SendAsync(activity, () => new AskMeAnything());
AskMeAnything is a class implementing Idialog. The problem is ,its again going/calling the formflow rather than jumping into the above mentioned dialog.
I read about IdialogStack but unable to understand how to remove the dialog on top of stack or something related to it.
i need help in moving to other dialog without looping into formflow.
Thanks
The first time you call Conversation.SendAsync(...) you actually create a root dialog for your conversation. Every consecutive call to the bot will still enter the controller but will be routed to the dialog at the top of the stack.
So when you call Conversation.SendAsync(...) for a second time you are actually trying to change the root dialog in the stack. I don't think this is possible and that's why your form is called again.
To solve this problem I would create a different dialog and make that dialog your root dialog. From this root dialog you can call your form and any other dialog.

wxpython + mvc delete controller

I'm programming in wxpython and I'm trying to use the mvc model. But I'm stuck with a lost controller :) I'll explain.
A have a panel which calls a controller. I do some things. then I destroy my controller and my panel. Well I try.
del self.tempMApanel.controller
self.tempMApanel.Destroy()
What I know for sure is that the controller isn't linked anymore with the panel because if I 'print' the controller I get an error that says main object has no attribute controller:
print "self.tempMApanel.controller: ",self.tempMApanel.controller #'Main' object has no attribute 'controller'
At a certain moment I recreate the panel with a new controller. But when I send a message (with pub.Sendmessage) to do something in the controller, the message is picked up by the old controller which isn't connected to a panel and the program complains (ofcourse :) )
SO my specific question is, can you 'kill' a controller and is it possible to have a 'lost', 'single', 'flying' controller?
The past 2 days programming was lifted to another dimension of difficult. All the virtual connections ... sometimes it is difficult to keep track and it is difficult to explain and ask for help. So I hope it is clear what I'm trying to say.
tx in advance and I hope there are some geniuses who can help me!
My day is so good!! I was talking about my 'lost' controller problem with our IT-guy and he said you use a subscriber, maybe your reference to your controller is still in there somewhere. And indeed, the controller was added to a list, so I had to remove the controller from this list and then I could remove my view.
I'm so relieved! The last 3 days there were so many problems in my program and I solved them all but this one. But now I can move on the next part.
So my advice is, always look for references if you see this kind of problem.

Microsoft PowerApps | How to get calendar events from o365 connection?

I'm currently testing some stuff with Microsoft PowerApps. My aim is to create an app, which shows the calendar events of my office 365 account. I've applied the connection to office 365, and was able to get emails. But I don't know how to get the events, because nothing is documented. In the PowerAppStudio environment I can see that functions such as Office365.CalendarGetItem(... are available but the syntax is unclear. Please, can someone explain to me how to use it correctly.
My experience as follows;
You need to use
Office365Outlook.CalendarGetTables()
to get the Calendar object.Names and
Office365Outlook.CalendarGetItems()
To get the Calendar items for that object.
To demonstrate:
Add your Office365 outlook connector
Create a dropdown and take note of the name, or give it a new name
Set the Items value of the dropdown to Office365.CalendarGetTables().value
This gives you a your reference to get calendar items from - which you can now do with a gallery;
Add a gallery (I just pick a layout template I like and reconfigure)
Set the Items value of the gallery to Office365.CalendarGetItems(YourDropDownName.Selected.Name).value
where YourDropDownName is the name of the dropdown you created.
It will, by default, list from today's meetings onwards.
There are some filter options with CalendarGetItems, the syntax is as follows;
Office365Outlook.CalendarGetItems (string table, [advanced][Optional]string $filter, [advanced][Optional]string $orderby, [advanced][Optional]integer $skip, [advanced][Optional]integer $top)
I use this great reference as well PowerApps reference
You need to select a calendar where the items will be read.
Office365.CalendarGetItems(name of your calendar).value
Add the Office 365 connector as a connection
Create blank form
Add a listbox
Set ListBox>Items = Office365.CalendarGetTables().value.DisplayName
Add a gallery
Change gallery style to be Title and subtitle on Data tab
Dry gallery>Items = Office365.CalendarGetTables().value
You can now see your calendars and their names.
I'm going to futz around further with this...
In the "My experience" answer, I had to change "Office365." to "Office365Outlook.". I suspect content errors as the example of advanced options used "Office365Outlook.CalendarGetItems".
So
Office365.CalendarGetTables().value
Office365.CalendarGetItems(YourDropDownName.Selected.Name).value
became
Office365Outlook.CalendarGetTables().value
Office365Outlook.CalendarGetItems(YourDropDownName.Selected.Name).value
My Power Apps data source was "Office365Outlook" and my own email account at https://outlook.office.com/mail/inbox .
These worked for me.

What ComponentQuery should I use for this example in this.control()?

I have:
1.) What should I type in this.control() for getting the reference to the grid panel?
My plan is, when user double clicks one row, new tab is created. I already have code for creating new tabs but I just need to get reference to the grid panel.
Something like this:
'viewport > westpanel > accordion > gridpanel': {
doubleclick: function...
}
2.) Let's say that I gave an ID to the grid panel. How can I get reference in this.control using .get method?
3.) How can I be sure that I've got the right reference? Can I console.log() - it or something like that?
I would know how to do this without MVC but here I need help. :)
Thank you! :)
It is quite easy once you understand how to use it. First you should read the API about the ComponentQuery cause that is what is used within the control.
this depends on your components. You so can go by the xtype 'panel > grid': {itemdblclick:this.yourCallback}
the recommend way if you can't define a really unique path by xtypes '#myID': {itemdblclick:this.yourCallback} using defined refs within the control is not possible in the currently release, as far as I know.
Use Id's instead of just xtypes '#myID > grid': {itemdblclick:this.yourCallback} or define additional params '#myID > grid[customProp=identString]': {itemdblclick:this.yourCallback}

Allowing user selected Global Theme for winform app

I am using DevExpress controls in a winform app I am building for internal use. My app has about 30 forms in total and I am trying to figure out a way to allow my user's to select a theme. I have seen this mentioned here at SO multiple times in answers to other posts.
I understand how the StyleController works, I believe, but what I am wondering is how I can use 1 Style controller for the whole app.
Right now I am trying to create 1 StlyeController at the Shell form and then pass a reference to it to each child form. From there I then have to programatically set the StyleController property for each control. I don't mind I just wonder, especially from those who have done this, if there is a simpler way?
It is very simple. This example is assuming that you are using skins.
In the constructor of your main form calls:
DevExpress.Skins.SkinManager.EnableFormSkins();
This will enable your form to use the current skin. It is also important that each of your forms derived from XtraForm.
After that you need to setup the global look and feel object for your application:
//This set the style to use skin technology
DevExpress.LookAndFeel.UserLookAndFeel.Default.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Skin;
//Here we specify the skin to use by its name
DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("Black");
If you want to set the look and feel of your application like Office 2003, the setup is different. You just have to call the following function:
DevExpress.LookAndFeel.UserLookAndFeel.Default.SetOffice2003Style();
So, every control of devexpress will use these settings to paint themselves. It is possible to specify a custom LookAndFeel object for some controls but I never used it because I dont see the point to have a custom display for a control or a form.
Exception:
There is one exception in Devexpress framework. The NavBarControl does not use the skin technology automatically from your global LookAndFeel object, you need to specify a setting to enable that:
//To use the current skin
youNavBarControl.PaintStyleName = "SkinNavigationPane";
//To use the current look and feel without the skin
youNavBarControl.PaintStyleName = "NavigationPane";
With version 11.2 I used the information in this article:
http://www.devexpress.com/Support/Center/p/K18013.aspx
In summary :
* Inherit all your forms from XtraForm
* Leave look and feel settings default so that they use the default skin
* Modify the default skin with the following line of code:
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName = "DevExpress Dark Style";

Resources