My 2p about ERP Solutions, Information Worker Solutions and other software products (mainly Microsoft Dynamics AX and Microsoft SharePoint).

10 September 2009

Stack Trace after adding FileNameOpen EDT to a form

by Patrik Luca 0 comments

Tag



Problem Description: stack trace after adding FileNmeOpen Extended Data Type to a form

After having added a StringEdit control to a Dynamics AX form with as ExtendedDataType FileNameOpen, you get a stack trace upon clicking the open icon: Error executing code: FormRun object does not have method ‘filenameLookupInitialPath’.

The same could happen if you add one with as ExtendedDataType FilePath.

Solution: add some form methods

To fix this, you should add some methods to your form.

str fileNameLookupFilename()

{

    return '';

}


str fileNameLookupTitle()

{

    return "@SYS53008";

}


str fileNameLookupInitialPath()

{

    return '';

}

container fileNameLookupFilter()

{

    return ['All files','*.*'];

}

An example can be found on form CompanyImage.

You could replace the fileNameLookupFilter to show only files of a certain type, for example only *.txt files. An example could be in this case:

container fileNameLookupFilter() 

{

    return ['All *.txt files','*.txt'];

}

Comments 0 comments

Patrik Luca, Ieper, BELGIUM
Feel free to use or spread all of the content on my blog. In return, linking back to my blog would be greatly appreciated. All my posts and articles are provided "AS IS" with no warranties.

Subscribe feeds via e-mail
Subscribe in your preferred RSS reader

Subscribe feeds rss Most Read Entries

Subscribe feeds rss Recent Entries

Categories

Recommended Books


Subscribe feeds rss Recent Comments

This Blog is part of the U Comment I Follow movement in blogosphere. Means the comment field of this blog is made DOFOLLOW. Spam wont be tolerated.

Blog Archive

My Blog List

Followers

Links