Show Document Handling - Available Notes

Return To AX Content

In Dynamics AX (AXAPTA) the Document Handling feature is obscure to say the least. You have a little tiny button on top, that if clicked, it will display the attached notes for that particular record.

There is a very easy way, to make the notes display. I am sure there are other methods too but the one we used is a button, that changes colour if there is a note present. Below I will give you the code and location for it.

1. Create a button on the screen and make sure that you create a display menu item that contains in the properties an Object: Docuview, RunOn: Called from and i set SecurityKey: BasicMisc
I named this item DocuView.
Then I point the button to the just created DocuView MenuItemName

2. Under the main Methods section for the form i created a custom method:
//If there is a comment/note changes colour to yellow
public void CustomButtonColors()
{
;
//
if (DocuRef::exist(Table.dataAreaId, #ofTable, Table.RecId))
{
ButtonNotes.backgroundColor(WinAPI::RGB2int(255,255,0));
}
else
{
ButtonNotes.backgroundColor(WinAPI::RGB2int(214, 211, 206));
}
}

3. In the active() overwrite method for the table in the DataSource of the form after the super() call I put

element.CustomButtonColors();

And there you have it. Now you can see the Notes!
Return To AX Content