Thursday, December 18, 2014

Hide the Export button from the report viewer

I did a little investigation today into how you can work with the report viewer toolbar.

One practical example is to hide the "Export" button.

First add a reference to: Microsoft.ReportViewer.WinForms

Next, add this code to be called somewhere from the report viewer form:

What I really would like to do, was to add some buttons to the toolbar. But I didn't get that far today.

Tuesday, November 25, 2014

Monday, November 17, 2014

Thoughts on validateField

Here is a couple of thoughts on how to write validateField methods in the best possible way.  The validateField method is automatically called when you change a field value of a record in the client.

There are two things about validateField, that I haven't been able to figure out:

  • Is the method originally intended to be called only when a field value is changed, or should you also be able to call it to validate the current value?
  • Why do AX 2012 also have a name based validateFieldValue method?

I raise the first question because the standard AX data consistency check actually calls validateField on existing data to check the present value of the fields. That gives a number of errors from standard AX, that really isn't errors but appears so because the code on the field assumes you have modified the field value from something else to the present value.

One example of this, is the many errors you get from Currency:

In this case you could add code to see if the value actually is changed.

Also some validations should check that the field actually has value. One example from standard AX of a validation not doing this is license plate validation on warehouse locations, where a blank value in some fields will give you this error:

Here the validation looks up another location using a blank value, and the returned flag for License Plate Control will of course be blank.

Don’t update data in a validation method. You should always be able to call a validation method without risking any data to change in the system. Changes should be moved to the modifiedField, modifiedFieldValue, update or insert method.

Don't display any dialogs from the table based validation method without checking if the validation method is being triggered from a form data source. The code analysis tool on LCS will report this as a Best Practice issue, as the validation could be called from a server tier. Consider moving these dialogs to the forms where needed.

Friday, November 14, 2014

Search available icons from embedded resources

I was today made aware of this clever searchable cross reference like tool for finding places where image resources are used in AX:

You can read more about the tool and download it here:

Thursday, November 13, 2014

Required check and update when deleting a backing entity for a financial dimension

When you delete a record that is also a backing entity for a financial dimension, you need to check that the financial dimension framework allows you to delete the backing entity and you need to update the financial dimension as being deleted.

This is done in the delete method of the backing entity.
The check takes place outside TTS:
// Check to see if the associated dimension attribute value has been used
// in a way that would prevent deletion.
if (!DimensionValidation::canDeleteEntityValue(this))
    throw error(strFmt("@SYS134392", this.PersonnelNumber));
And the update takes place within TTS:
// Update the associated dimension attribute value.

Examples of this can be found several places in standard AX, for example on the tables:
  • ProjTable
  • HcmWorker

Monday, October 20, 2014

Quick tip: New classes for sending mail in AX 2012 R3

In AX 2012 R3 there is a new framework for sending e-mail. Entirely based on .NET API's. A lot of standard code sending mail has taken up this new framework.

It seems that you'd require .NET 4.5 in order to use it.

Check SysMailerNet on MSDN.

Tuesday, September 30, 2014

The nuts and bolts of Lync / Presence / IM integration

I recently had to figure out what makes the "Presence" integration tick. I didn't find any really good explanations to work from, so here I'll try sum up the bits that makes this work. I'll try to boil the information down to the bare minimum of what you need to know. The feature is actually very flexible and I don't want this to be a very long post with information about tons of ways to use it.

Okay, first of all you'll need to have a Lync client installed along with your AX client. And you need to be logged into Lync with your account for that.

Next you'll need to add some contacts in AX. You must create an address of type e-mail and fill the address with the e-mail address this contact uses for instant messaging (IM). Please observe that some people have different e-mail addresses for regular e-mail and for IM.

In the contact form you must click the More options / Advanced button and check the "Instant messenger sign-in" check box. This tells AX to use this particular address of the contact when integrating with Lync. If the address is only used for IM and not also for regular e-mail, check the "Instant message" check box too.

When you want to show the presence indicator next to a field on a form, there are three properties of the form field to consider:
  • PresenceIndicatorAllowed. I assume you can guess what this controls.
  • PresenceDataSource and PresenceDataField. This is the datasource and datasource field from the form that holds data used to find the right contact with.
The last thing, is to control how the contact person is found and set up a PresenceInfo object. 

There are different approaches for different kinds of key data. Here AX looks at the extended data source of the PresenceDataField that you specified on the form field. 

On the extended data type there are two properties pointing to the class method doing the job of finding the contact person. The properties are PresenceClass and PresenceMethod. I think all standard implementations of these point to the DirPresenceInfo class as the PresenceClass. If you examine this class you can see how it based on different kinds of keys finds the right contact person and creates a PresenceInfo object for the contact.

That's all.

Tuesday, September 16, 2014

Send tweets from AX via the Retail module

Once again I fell over some objects with interesting names in the retail code. This time I learned that you can update Twitter and Facebook from AX.

In the following I'll describe the Twitter setup.

First of all, you need to setup an application under your Twitter account. Go to to do that. Under settings, you need to fill in:
  • Name: This will be the name of your application. Mine is called PalleAgermarkTest.
  • Description: This shows up when for example you later on link the application to be able to use your Twitter account.
  • Website: This should be a website where users can download the application. Since I don't have a real application, I have just put the address of my blog.
  • Callback URL: This is needed when AX links the application to your Twitter account. Again, the address is not important (but an address is needed) for this demonstration and I have again put the address of my blog here.
On the API tab of the setup, you'll get an API key and an API secret. You will need these in AX.

On the Permissions tab, give the application write access to the Twitter accounts that sign up to the application:

That's it for Twitter.

Go to Retail \ Setup \ Parameters \ Retail parameters to setup some seed data for the retail module. Click the Initialize button:

Now in AX, go to Retail \ Setup \ Parameters \ Retail shared parameters and enter the API key secrets from above:

Then go to Sales and marketing \ Setup \ Campaigns \ Media types and add Twitter as a media type:

Now when clicking the Link account button, you should get the option to link your Twitter account (the screen clip is in Danish, but you should be able to get the idea):

So now all the bits and pieces are setup, and a very simplified piece of code like this example is able to post to Twitter:

static void Tweet(Args _args)
    smmCampaignMediaTypeGroup           mediaTypeGroup;
    RetailMediaChannelConnectorSettings settings;
    RetailMediaChannelTwitterConnector  connector;
    RetailMediaChannelMessage           message;

    select firstOnly TableId from mediaTypeGroup
        where mediaTypeGroup.CampaignMediaTypeDescription == 'Twitter'
    join settings
        where settings.smmCampaignMediaTypeGroup == mediaTypeGroup.CampaignMediaTypeId;

    connector = RetailMediaChannelTwitterConnector::construct(settings);
    message = RetailMediaChannelMessage::construct();
    message.parmMessage("Tweet from AX");

The result:

Saturday, September 13, 2014

Dimension Defaulting on MSDN blogs

The Microsoft Dynamics AX GFM team have written up a great seven part series about dimension defaulting. Read it here:

This would really have been helpful information to get when this new framework was released, but better later than never I guess.

Thursday, September 11, 2014

Normalization pattern for custom fields in separate table

When you need to add fields to standard tables, you can choose to add them to a new linked table rather than to the standard table.

If you do that, you might find the pattern for normalization for county/region fields useful.

Have a look at the White Paper "Adapting your code to table normalization for country/region fields in Microsoft Dynamics AX 2012 R2"

Thursday, August 28, 2014

My new best friend: Set-AXModelStore -InstallMode

I'm working on an upgrade from AX 2012 R2 to AX 2012 R3, and during the initial work upgrading the code I experience from time to time that the client crashes. To be fair we probably have modifications in places we shouldn't have them, though I have removed the worst before starting the upgrade.

The problem is that when I restart the client, I get an empty workspace and the menu item to open a new development workspace is disabled.

Panic sets in and my pulse rate gets alarming high, but...

Manually setting the model store in installation mode again and restarting the client opens the "The model store has been modified" dialog and I'm able to open a development workspace again.

So if that happens to you, try to open the Microsoft Dynamics AX 2012 Management Shell and enter the command "Set-AXModelStore -InstallMode".

Tuesday, August 26, 2014

Dynamics AX learning paths

Here is a really cool document i found on a danish Microsoft site. It gives you a good overview of AX training for whatever role you are in.

Download it here from my OneDrive.

Tuesday, August 19, 2014

Spelling errors in Office Add-In can cause wrong value substitution in table columns in R2

When you create a Word template with the Office Add-In and Word for some reason marks field names  in your columns as being misspelled, these columns aren't getting their names properly replaced with actual values when you merge the template into a document with values.

You can reproduce the problem by going through the following steps on for example a standard AX 2012 R2 demo machine.
  1. Make sure your AX user is setup to run en-us as language.
  2. Make sure that you in Word have at least one other proofing language than en-us installed.
  3. Make sure that Word uses en-us as the default proofing language.
  4. Go to Organization administration / Setup / Document Management / Documents data sources.
  5. Add the SalesLine query and activate it.
  6. Open Word.
  7. Add some text in top of the document, just to make some space to the table you are about to insert.
  8. Insert a table with two rows and five columns.
  9. Go to the Dynamics AX tab and click Add Data.
  10. Select the data source you started out setting up.
  11. Add the following fields.
    • Sales order
    • Item number
    • Quantity (ordered quantity)
    • Unit price
    • Net amount
  12. Save the document and run a Merge.
  13. That should look ok.
  14. Go back to the template, select all with Ctrl-A and change the proofing language to something other than en-us.
  15. Run a spell-check and check that it finds supposed spelling errors in your column names.
  16. Save the document and do a new Merge.
  17. Now things don't look alright.
Some screenshots:
The template

The first well done merge

The template with the new proofing language and after spell check
The not so well done merge

There are some workarounds:

  1. Keep you fields names to just one word.
  2. Run a spell-check of the template and choose to ignore all spelling errors in fields names, making the squiggly lines disappear.
  3. Use a speciel Word style, which set up to not being checked for spelling errors, for the fields.
  4. Sometimes just shortening the name of the field in the table helps; for example from "Item number" to just "Item".
Well, it is an odd issue. But now you know a probable cause if you run into it.

For some KB2904824 should fix the issue. I havn't had any luck on my systems though.
I can't reproduce the issue in R3, so it must be fair to assume that is has been fixed for R3.

Thursday, August 7, 2014

Check the SQL statement generated from a regular X++ select statement

So here is another small tip based on me reading Inside Microsoft Dynamics AX 2012 R3.

If you want to know what SQL statement the SQL Server query processor generates based on a regular X++ select statement, you can add to the keyword generateOnly to the statement and afterwards call the getSQLStatement method on the record buffer.

   AccountingEvent         accountingEvent;
   SourceDocumentHeader    sourceDocumentHeader;
   select generateonly accountingEvent
   join sourceDocumentHeader 
       where sourceDocumentHeader.RecId == accountingEvent.SourceDocumentHeader;

   info (accountingEvent.getSQLStatement());

That turns out something like this:

Friday, August 1, 2014

Use the Filter tab of the Find dialog

I have started to read Inside Microsoft Dynamics AX 2012 R3 and I read it from cover to cover. Sometimes you get reminded of great but forgotten features when doing so.

This time I was reminded of the Filter tab of the Find dialog. With this filter you can create any kind of boolean function to control what the tool returns of findings.

Here is a small example you can use to find methods with more that 50 lines:

Here I have used it on the SalesFormLetter class.

Tuesday, July 29, 2014

New online course: Data Management in Microsoft Dynamics AX 2012 R3

Requires access to

This e-Learning course provides students with the necessary tools and resources to configure and use the Data Import / Export Framework and the Master Data Management Framework in Microsoft Dynamics AX 2012 R3. 

Topics covered in this eLearning course include:

  • Module 00: Course Introduction and Expert Introductio
  • Module 01: Overview of Data Management
  • Module 02: Introduction to Data Import Export Framework
  • Module 03: Migrating Data using the Data Import Export Framework
  • Module 04: Creating a Custom Entity
  • Module 05: Introduction to Master Data Management
  • Module 06: Using Master Data Management
  • Module 07: Course Review

Go to and search for course 80645. 

Friday, July 25, 2014

New Flipboard magazine

I have created a new Flipboard magazine to hold, only, the very best articles about AX development.

You can read it here:

Feel free to drop me a comment if you think I have missed a good article.

Tuesday, July 1, 2014

Packt's 10 Year Celebration Campaign

Packt Publishing is celebrating their first ten years by offering all its eBooks and Videos at 10$ each until July 5th.

So this is a good opportunity to get any of their Dynamics AX books you are missing in your electronic library. 

Click here to take advantage of the offer:

Wednesday, June 25, 2014

Book review: Customer Success with Microsoft Dynamics Sure Step

Customer Success with Microsoft Dynamics Sure Step is essential an updated version of the Microsoft Dynamics Sure Step 2010 book from 2011. The extent of updated material seems to be quite comprehensive though.

The book starts out giving some background about methodology and about why you'd want to follow a methodology. And it describes some of the major recognized methodologies for business solution projects. If you only have limited theoretical project background, this is very helpful to understand what the project stake holders discuss and why your role does what it does within a project. 

Further the book goes through some theories about selling business solutions, before it moves on to actually dealing with the project implementation. In the major middle part you're walked through all the actual implementing phases as they are addressed with Sure Step.

Finally the book rounds off with a practical guide with good insights to implementing Sure Step.

No matter what role you find yourself in on a Dynamics project being implemented with Sure Step, you can find some useful information from this book. 

You can read more about the book, read sample chapters and buy the book from Packt Publishing here:

Tuesday, May 20, 2014

Expressions in the query dialog

Pressed for an answer from a customer, I today tried something that I don't think I have tried before, and that is to use a query expression directly from the query dialog. To my surprise it actually works.

Below screenshot is from AX 2009, but it also works in AX 2012.

Read more about query expressions here.

Enhanced Session Mode in the new AX2012 R3 demo Hyper-V

The new demo image supports Enhanced Session Mode, which gives you a more Remote Desktop like connection when you connect directly from the Hyper-V Manager. For example you can choose a screen resolution.

Read more about Enhanced Session Mode Overview.

Sunday, May 11, 2014

Read mails from a POP3 account with AX

Often when you browse lists of new AX features and AOT objects, you stumble across something that makes you a bit curious.

In R3 I came across some Brazilian functionality where AX connects to an e-mail account, fetches some official government issued files and processes these.

So AX can read e-mails, eh!?

Oh yes, and the Brazilian stuff is backed by a very nice basic framework for doing so.

Here is a very simple piece of code to show how it works.
static void Job1(Args _args)
    SysEmailAccount         sysEmailAccount;
    SysEmailAccountList     sysEmailAccountList = SysEmailAccountList::construct();
    SysEmailReader          sysEmailReader      = SysEmailReader::construct();
    SysEmailMessageReadList sysEmailMessageReadList;
    SysEmailMessageRead     sysEmailMessageRead;
    // Setup the account
    sysEmailAccount = SysEmailAccount::newAccount('', '', 'your_password', 995, true);
    // Add the account to a list of accounts to be checked
    // Get a list of unread meassages
    sysEmailMessageReadList = sysEmailReader.getUnreadEmailMessages(sysEmailAccountList);
    // Loop over the list of unread mesages
    while (sysEmailMessageReadList.moveNext())
        // Get the current message from the message loop
        sysEmailMessageRead = sysEmailMessageReadList.current();
        // Work with this message(show the subject line)
        info (sysEmailMessageRead.parmSubject());
In a production environment you should of course not keep your account and password in clear text. Look into how the framework works with encrypted values for these, by checking the Brazilian feature.

I tried to test this with my account. If you do that and you have two-step verification turned on, you need to turn off two-step verification while testing or create a new app password to login with. Remember to enable two-step verification again if you disable it.

Also I tried to read messages with the Danish letters "ÆØÅ" - that didn't come out nicely. You probably need to do some extra work with the received text to set the right encoding. I didn't look into this and I'd love to hear if someone does.

In AX under "System administration / Setup / System / E-mail client constraints" you can find some setting of importance to this feature.

Thursday, May 8, 2014

Microsoft Dynamics AX 2012 Reference: Tables and Table Groups

This new spreadsheet includes the name, table group, table type, whether the table is a system table, whether the table is visible in the Application Object Tree (AOT), and whether the table is shared.

Download it from here.

Tuesday, May 6, 2014

Cross reference update never finishing on AX 2012 R2

I had a development box where I just couldn't get a cross reference update to finish. Even letting it run for days didn't help.

I finally got to run a SQL trace on what was going on. A thing that I probably should have tried a lot earlier. From the trace I could see that the cross reference for some reason was in an infinite loop on a particular form. I checked over a few hours and it never did seem to get past that form.

I killed the process and started a new cross reference agin, but this time I deleted the existing cross reference first:

When that was finished, I started a new cross reference update with the "Update all" option checked and this time cross reference was updated within the expected time frame.

Wednesday, April 30, 2014

Discarding merge of a changeset in TFS

On a project I work on, we have just had the first branch of my life. The merge features in TFS helps me merge needed changes between the two branches and it works just perfect.

As part of the branch I have had to assign a particular range for label id's in one of the branches. This is to avoid conflicts when merging the label files. You set up the label id range from Version Control / System settings / General. Changing this, triggers a change to VCSDef.xml which is also under version in TFS.

This is obviously not a change that I'd ever want to merge. Fortunately there is a way to tell TFS to discard the change when suggesting what to merge. There is no UI for the command, so open a Visual Studio command prompt from the workspace folder to use and enter the following:

tf merge /discard /version:C1134 /recursive SourceBranchName TargetBranchName

This also triggers a change, so you must check that change in. And that's it. The changeset is not suggested for merge between these branches again.

Monday, April 28, 2014

AX Configuration Store

AX uses the registry on the local computer of the client when it needs to know information about how the client is configured.

To set this up for each user has been quite tedious and often we have just created axc files with the configuration and put it on a file share. The problem with that approach is that neither AX itself or other applications have any means to figure out details of the client configuration. Two examples of applications that would benefit of knowing this is Visual Studio and MS Project.

In AX 2012 the configuration tool is extended with a bridge between the two methods of pointing to the configuration. This is called Configuration Store and with this you point out the axc file on the share, in the client configuration utility. So AX and other applications still knows about the active configuration through the registry, but you only need to apply configuration changes to the axc file on the file share.

Read more about the possibilities for shared client configurations here on TechNet:

This may be old news if you work a lot with AX installations, but it was new to me and I hope I wasn't the last to know.

Tuesday, April 15, 2014

Limit memory consumption of SharePoint 2013's Search process

On my different developer boxes and the demo images I use as sandboxes, I have the problem that SharePoint's Search process has a tendency to hog all available memory.

Today I took the time to try to figure out what to do about it, and I came across this article which actually helped.

I already had the Reduced level of performance, but changing the configuration file to allow it to use a smaller amount of memory helped.

Wednesday, April 9, 2014

A bit of code for creating a worker in AX 2012

private HcmPersonnelNumberId nextPersonnelNumberId()
    HcmPersonnelNumberId    hcmPersonnelNumberId;
    NumberSequenceReference numberSeqReferencePersonnelNum;
    NumberSequenceTable     numberSeqTablePersonnelNum;
    NumberSeq               numberSeqPersonnelNum;

    // Number Sequence
    numberSeqReferencePersonnelNum  = NumberSeqReference::findReference(extendedTypeNum(HcmPersonnelNumberId));
    numberSeqTablePersonnelNum      = NumberSequenceTable::find(numberSeqReferencePersonnelNum.NumberSequenceId);

    if (numberSeqTablePersonnelNum)
        // generate worker personnel number if number sequence code is created.
        numberSeqPersonnelNum = NumberSeq::newGetNumFromId(numberSeqTablePersonnelNum.RecId, true, true);

            hcmPersonnelNumberId = numberSeqPersonnelNum.num();
    return hcmPersonnelNumberId;

private void createHCMWorker()
    AxDirPerson             person;
    AxDirPersonName         personName;
    HcmWorker               worker;
    HcmPersonnelNumberId    hcmPersonnelNumberId;

    hcmPersonnelNumberId = this.nextPersonnelNumberId();

    if (!hcmPersonnelNumberId)

    // Create a person
    person = AxDirPerson::construct();
    person.parmName("Santa Claus");;

    personName = AxDirPersonName::construct();

    // Create the worker
    HcmWorkerTransition::newCreateHcmWorker(personName.dirPersonName(), hcmPersonnelNumberId);

Monday, April 7, 2014

How to make a ZIP file from AX 2012 R2 CU7

If you need to create ZIP files from AX you can now look at the class SysTaskRecorderPackageZip to see how that is done. This is a new class included in CU7 (KB2885603) or the earlier hotfix from KB2863182.

Wednesday, March 5, 2014

Announcing new book: Microsoft Dynamics AX 2012 R2 Services

A new version of the "Microsoft Dynamics AX 2012 R2 Services" book is due to be published.

Read more, and enter the contest for a chance to win a copy, here:

Friday, February 28, 2014

Improvements to Issue Search on Lifecycle Services

Issue Search now not only supports search by string or KB but also supports search by AOT object path and AOT object element.
  • To search for an AOT object path, use the format “$\ObjectType\Object”. For example $\Classes\Tax.
  • To search for an AOT object element, use the format “$ObjectType\Object#Element”. For example $\Classes\Tax#post.

Thursday, February 27, 2014

Beware when using SqlDictionary for reflection in AX

I stumbled across this little quirk today, in AX 2012 R2. 

If you use SqlDictionary for reflection on tables, you'll miss all tables that are extended from another table. These tables are not in SqlDictionary by themselves, the fields are listed with the parent table. So SqlDictionary reflects how the table(s) are created on SQL Server and not how they are modelled in the AOT. 

Wednesday, February 19, 2014

Bing Code Search for C#

The Bing Code Search add-in for Visual Studio 2013 makes it easier for .NET developers to search for and reuse code samples from across the coding community, including MSDNStackOverflow, Dotnetperls and  CSharp411.

Bing Code Search improves developer productivity and speed by bringing the experience of searching for reusable C# code into Visual Studio IDE.

Download here.

Wednesday, January 22, 2014

Setup a manged control for drag and drop

In an earlier post I have made an example of to make a form with a drag 'n' drop enabled managed control.

Now, here is the initialization code to put a nice image in the control (which is a PictureBox control now), and set the transparency color of the control to the background color of, in this case, the tab page it is on:

private void initDropControl()
    Image                           resImg;
    System.Drawing.Image            img;
    System.Drawing.Color            backGroundColor;
    int                             colorR;
    int                             colorG;
    int                             colorB;
    System.Windows.Forms.PictureBox dropControl;

    // Get handle to the control
    dropControl = ManagedHostDropFile.control();

    // Setup event handlers for the control
    dropControl.add_DragDrop(new ManagedEventHandler(this, 'dropFile_DragDrop'));
    dropControl.add_DragEnter(new ManagedEventHandler(this, 'dropFile_DragEnter'));

    // Load the AX resource image
    resImg = new Image();

    // Get the tab page background color
    backGroundColor = System.Drawing.ColorTranslator::FromOle(TabPageLoadFile.backgroundColor());
    colorR = backGroundColor.get_R();
    colorG = backGroundColor.get_G();
    colorB = backGroundColor.get_B();

    // Set the transparancy color of the AX resource image to the tab page background color
    resImg.transparent(true, colorR, colorG, colorB);

    // Create an image object that the Windows Form control is able to load
    img = System.Drawing.Image::FromHbitmap(new System.IntPtr(resImg.exportBitmap()));

    // Add the image to the control

How to delete Label Files from AX 2012

Here are the steps to delete Label Files from AX 2012:

  • Create a new model. You could call it "LabelsBeGone".
  • Open the AOT and move the Label File(s) you want to get rid of to the new model.
  • Close AX and stop the AOS.
  • Use AXUtil to delete the new model.
  • Delete the label files from the server folder; C:\Program Files\Microsoft Dynamics AX\60\Server\...\bin\Application\Appl\Standard
  • Start the AOS.
  • Skip the upgrade wizard.

New book: Inside Microsoft Dynamics AX 2012 R3

I just saw this on Amazon:

"Fully updated for Microsoft Dynamics AX 2012 R3!

Dig into the architecture and internals of Microsoft Dynamics AX 2012 R3 - with firsthand insights from the team that designed and developed it. Deepen your knowledge of the underlying frameworks, components, and tools - and deliver custom ERP applications with the extensibility and performance your business needs.

Useful for Microsoft Dynamics AX solution developers at all levels, this guide will provide max benefit to those who understand OOP, relational database, and Transact-SQL concepts."

The book should be out in June, so there is your summer holiday reading.

Monday, January 20, 2014

Relations to field id's and the data export framework

In AX 2012 there is no guarantee that id's are the same between otherwise similar applications. So when you have a reference to a field id in your data, that reference may be broken when you import data again.

But it seems like the framework is able to handle this issue, if you just give it a helping hand.

Consider a table like this:

When trying to export this table, you will get a few errors:

What I need to do, is to add a field holding the id for table of the field id reference, and add both fields to a field group (allowing the framework to figure out that these two fields are related):

I can't find any documentation about this behavior. If you know of any, please comment. 

Thursday, January 9, 2014

Need to drag and drop files or text into AX 2012?

In AX versions before 2012, Microsoft shipped a small ActiveX component that you could add to forms in order to be able to drag files onto the form and get the filepath and name of the file.

That ActiveX is not distributed anymore. The feature can be replaced by using a managed control, and you can see examples of that in the forms SMMDocuments and SMMEncyclopedia.

Here is a small form with samples on how to catch files and text being dropped on a control: Download from SkyDrive