An item I use frequently in the EP development, changing the query ranges from code behind.
Showing posts with label CodeBook. Show all posts
Showing posts with label CodeBook. Show all posts
Fastest way to set MenuItemContext in EP
A reference to what I believe is (one of the) easiest way to pass the context to a MenuItem in EP.
Consume a SOAP webservice without adding a service reference
I needed these days to consume a very simple SOAP web service, but needed to do it directly from code in C#, without using the proxy classes / adding a service reference. Of course, it would have 0been easier, straightforward, etc, but for those who need to adopt (like myself due to certain constraints) this type of implementation, here it is just your basic example:
SysOperation dialog displaying values from caller
Just some simple topics about the SysOperation, which can however, be quite useful to people who are just starting the grasp the framework. Today, one way to display the values from the caller in the dialog.
Reset value in a reference group with a segmented control
Say you have a reference group control, and it's content is made up of a segmented control. The users are requesting that you reset the entire value if you go to any of the control's inner controls and delete the value in it.
Advanced filtering in code on Query object
This is by now old topic, call it the ABC of X++, however, for newcomers, or even experienced devs - who sometime are just too focused on how to do complex things that they just forget the basic :), thought to recall the following, whenever you want to add the OR logic operator in your sql where clause, be that only one time or multiple, with of course the additional complexity of precedence.
Creating an AxTableContext from a RecId
From the category "basic but must use", another code snippet of how you would create an AxTableContext in an EP page starting from a RecId value, in order to pass it to another page. Remember, lots of ways to do this, so, pick your favorite.
Run SSRS report from code to PDF file
For sure you've received the request to run a report in silent mode (just click on a button) and output it as a PDF file. The code to do this is quite straightforward, and there are also some places in AX that are also implementing this.
Insert row in grid after last current position
As the title says, lately I've been getting this request a lot: insert the newly created row after the last position, or otherwise said insert it at the bottom of the grid.
Save and Close buttons on EP page
In my development I am mainly using the default buttons in an EP AxForm, gave to us by the framework's properties like: AutoGenerateCancelButton, AutoGenerateInsertButton, AutoGenerateEditButton, and of course these combined with ShowButtonsInActionPane.
Still, sometime you really need to control the behavior of the form, so, the buttons in this case have to be added programmatically by you.
Still, sometime you really need to control the behavior of the form, so, the buttons in this case have to be added programmatically by you.
Save and keep current record in AxForm on EP page
Say you have a popup EP page that you are using to create new records. You want to add a Save button, which when press will save the record but will not close the form (a keepDialogOpen behavior).
Common building blocks in EP pages
I always find myself in the position to go and gather all the basic blocks of code necessary (more or less) in a EP web page from other already written pages. Of course, for this purpose, you can try to use the AxBaseUserControl web control already shipping with the EP standard code. It is useful when you have a simple scenario of building a page with an AxForm, I am not using it that much ... So, without other comments here is the list:
Adding an ActionPane from code in EP page
I am not sure if you are a fan of adding the ActionPane control from code or directly in the EP page definition - I can see for both arguments of pro and con, but lately I am using the first approach - works faster.
CodeBook - AX 2012 - Starting a process from within AX
If you need to start a process from AX, like open a file with it's associated application, or open a URL, just use the .Net way:
CodeBook - AX - enable a field
The most elegant way to enable / disable a control bounded to a datasource on a form:
CodeBook - AX - formHasMethod
These are code portions that you will find of course in so so many places in AX, and you are using them as well. They are well known but sometimes you may not recall something ... Useful code snippets:
Subscribe to:
Posts (Atom)