Have you ever created a window or a form within Extender that has detail information in a scrolling grid? Have you ever wished there was an easy way to have that scrolling grid automatically expand? Well, there is. With only 2 lines of code you can automatically expand that grid when the Extender form or window opens. We will show you code for both the form and the window since the 2 lines of code are slightly different. Since we are writing code, this does require Extender Enterprise to make this happen.
We will show you how to do this on an Extender window but the process would be the same on an Extender form. Create a new Extender window, with a detail scrolling grid by clicking on the Options button. We have created a window based on the Purchase Order Entry on the Line Scroll. We wanted to track multiple projects to separate out the line amount. Here is the window definition:
To add the code to automatically expand the scrolling window, click the Action Button, select “Open Window” from the drop down. Click the add drop down and choose Run Dynamics GP Script. Give the script a description, and select Extender as the product.
Add these two lines of code to have the window automatically expand when the extender window opens:
‘Scroll Expand Switch’ of window ‘User Defined Window’ of form <#FORM_NAME#> = 2;
expand window ‘Scrolling_Window’ of form <#FORM_NAME#>, true;
Save the action, and save the window. This will now automatically expand your scrolling grid when the window opens.
To add the code to automatically expand the scrolling window on your Extender form, click the Action Button, select “Open Form” from the drop down. Click the add drop down and choose Run Dynamics GP Script. Give the script a description, and select Extender as the product. Add these two lines of code to have the window automatically expand when the extender form opens.
‘Scroll Expand Switch’ of window ‘User Defined Form’ of form <#FORM_NAME#> = 2;
expand window ‘Scrolling_Window’ of form <#FORM_NAME#>, true;
A very quick and easy way to automatically expand the scrolling grid on your extender forms and windows.
Happy Coding!