Friday, July 18, 2014

HowTo: Automatically create parm methods on AxBC classes in one line of code!

When you get this best practice error:

"The Table.Field does not have a corresponding parm-method on the AxBC-class"

You can save yourself time and automatically add the methods with this line in a job:


Now whenever you run code that creates code, you should know what you're doing.  Also, this won't create the set methods, but I think that's a bug on Microsoft's part because part of the code appears to be there, but not used at all.  Look at `\Classes\AxGenerateAxBCClass\createInterfaceMethods` and see the variable `setMethodName` is not used.

I modified that class to make it work for my purposes.

No comments:

Post a Comment