Showing posts with label development. Show all posts
Showing posts with label development. Show all posts

Tuesday, July 21, 2020

D365 Visual Studio Application Explorer filters

When I learned that the Application Explorer search window uses regular expressions, it made finding objects so much easier.
Everyone should know that you can use: type:"form" to only find form type elements but if you add regular expressions to it, you can greatly limit the results returned.
For example, you can add: List$ to find only forms that end in the word List or you can add: ^Cust to only find forms that start with Cust.
My favorite is to find objects that start with one word (often the prefix we are using for customizations) and ends with another word. For example, to find all objects that start with MCA and end with the word TEST you can do: ^MCA.*Test$
I use this every single day!
Happy coding!

Thursday, August 1, 2019

Dynamics 365 - Breakpoint will not be hit. Symbols have not been loaded. . .

I looked all around for a resolution to this problem and everyone pointed to the same setting.
Under Dynamics 365 > Options :
Make sure under the Dynamics 365 > Debugging section, make sure that "Load symbols only for items in the solution" is NOT checked.

So I did that, but still continued to get this error when attempting to debug.

There is another setting that you need to check.

It is in VS under Tools > Options. Go to the Debugging > Symbols section and make sure that Automatically load symbols for :
"All modules, unless excluded" is selected!

Wednesday, January 11, 2012

Go to main table form dynamic use

You can set the FormRef property on a table to a display menu item that references a class. This will allow you to open different forms depending on some field value in the record that is passed. In the class main() you can retrieve the record and then open the appropriate form from code.

Wednesday, August 17, 2011

Dynamics AX 2009 - removing new line character from string (note/memo/text) fields

So this is my first post on this dynamics AX blog of mine. I'm going to use this to keep track of the little programming solutions I develop. Maybe it will help someone else too. Who knows?

My customer was having problems with a report showing the delivery address in excel. When a new line character is reached, it moves to another line. This made the excel format untenable for our 3rd party vendor that needed the data. So I wrote this code on the report to strip the new line character out and replace it with a space.

display str DeliveryStreet()
{
TextBuffer txt = new TextBuffer();
;

txt.setText(dataSource.DeliveryStreet);
txt.replace('\n',' ');
dataSource.DeliveryStreet = txt.getText();

return(dataSource.DeliveryStreet);
}

The DeliveryStreet field on the report calls this method instead of calling the field on the datasource.